From 194794a534463bbf7bfa754ef15c2e293e442ace Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 5 Jun 2021 14:45:16 +0200 Subject: Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCE This fixes a warning on Linux glibc: /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~ Tested on Void GNU/Linux glibc with gcc. Tested on various other platforms for regressions too namely: OpenBSD, NetBSD, FreeBSD, Void GNU/Linux musl. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index aae8e6e..e4366f4 100644 --- a/Makefile +++ b/Makefile @@ -13,10 +13,10 @@ RANLIB = ranlib # use system flags. SFEED_CFLAGS = ${CFLAGS} SFEED_LDFLAGS = ${LDFLAGS} -SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE +SFEED_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE # uncomment for conservative locked I/O. -#SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \ +#SFEED_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \ # -DGETNEXT=getchar BIN = \ -- cgit v1.2.3