From 671e2bb5b5fa00bd8094ce8c1ee61b8a607604ee Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 12 Apr 2017 22:11:09 -0700 Subject: [PATCH] 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. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a9d9129..ce8c530 100644 --- a/Makefile +++ b/Makefile @@ -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