Defining only _BSD_SOURCE is deprecated with version 2.20 of
glibc. It has been replaced by _DEFAULT_SOURCE. The manpage says
that code which wants to work in the same way on both old and new
versions of glibc should simply define both symbols.
Also move the definition up in fix_size as those feature flags
should be defined before including any standard headers.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Instead of passing the offset to the fix_size tool check the image to
fixup for a valid header so that only recognized files are fixed up.
This makes the usage of this tool safer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will allow to write the size of barebox at an offset of the binary
this is needed for ARM when using relocated binary
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>