diff options
author | Lucas Stach <dev@lynxeye.de> | 2015-03-01 18:53:29 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-02 07:32:01 +0100 |
commit | 603ba8c1ba906a66c71610b8a0a13375461565c2 (patch) | |
tree | f3f2412f2e8850c3c63aa8bda4823a858f28f4d7 /scripts/fix_size.c | |
parent | f8d5736939551cd6aaf7f2926999703fea6d2620 (diff) | |
download | barebox-603ba8c1ba906a66c71610b8a0a13375461565c2.tar.gz barebox-603ba8c1ba906a66c71610b8a0a13375461565c2.tar.xz |
scripts: fix warning generated by glibc 2.20
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>
Diffstat (limited to 'scripts/fix_size.c')
-rw-r--r-- | scripts/fix_size.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/fix_size.c b/scripts/fix_size.c index c7dcd5ff6b..7014a3faf6 100644 --- a/scripts/fix_size.c +++ b/scripts/fix_size.c @@ -1,3 +1,6 @@ +#define _BSD_SOURCE /* See feature_test_macros(7) */ +#define _DEFAULT_SOURCE + #include <stdlib.h> #include <stdio.h> #include <sys/types.h> @@ -6,9 +9,6 @@ #include <unistd.h> #include <stdint.h> #include <fcntl.h> -#ifndef _BSD_SOURCE -#define _BSD_SOURCE /* See feature_test_macros(7) */ -#endif #include <endian.h> int main(int argc, char**argv) |