diff options
author | wm4 <wm4@nowhere> | 2014-07-09 22:10:33 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-09 22:10:33 +0200 |
commit | 2e6a8f260ca169e2e1a5646eecfc322de6f77307 (patch) | |
tree | db963a90bd72633e90097518ee2280fb212b4830 /waftools | |
parent | 5d3f1a17a79fc1f5850a36c5224c777e3c3027ad (diff) |
build: avoid defining _GNU_SOURCE
_GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions
where glibc and POSIX conflict. Even though POSIX is worth less than
toilet paper, we still prefer the POSIX definitions.
rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define
_GNU_SOURCE too specifically for this file.
Diffstat (limited to 'waftools')
-rw-r--r-- | waftools/detections/compiler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index ad1f843f35..064c805b6c 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -17,7 +17,8 @@ def __test_and_add_flags__(ctx, flags): ctx.env.CFLAGS += ctx.env.CFLAGS_compiler def __add_generic_flags__(ctx): - ctx.env.CFLAGS += ["-D_ISOC99_SOURCE", "-D_GNU_SOURCE", + ctx.env.CFLAGS += ["-D_ISOC99_SOURCE", "-D_POSIX_C_SOURCE=200809L", + "-D_BSD_SOURCE", "-D_XOPEN_SOURCE=700", "-D_LARGEFILE_SOURCE", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE64_SOURCE", "-std=c99", "-Wall"] |