Compile programs with -D_POSIX_C_SOURCE=200809L

The _DEFAULT_SOURCE feature test macro is only supported by glibc 2.19
and later.  As a result, various things were not being defined when
building with an older glibc version, causing compile errors.  Instead,
_POSIX_C_SOURCE=200809L should expose everything we need.
This commit is contained in:
Eric Biggers 2017-04-12 22:11:09 -07:00
parent 27c13370cb
commit 671e2bb5b5

View File

@ -141,9 +141,9 @@ DEFAULT_TARGETS += $(SHARED_LIB)
#### Programs
PROG_CFLAGS += $(CFLAGS) \
-D_DEFAULT_SOURCE \
-D_FILE_OFFSET_BITS=64 \
PROG_CFLAGS += $(CFLAGS) \
-D_POSIX_C_SOURCE=200809L \
-D_FILE_OFFSET_BITS=64 \
-DHAVE_CONFIG_H
PROG_COMMON_HEADERS := programs/prog_util.h programs/config.h