From dc6a0641873d0fc1c6f5a013a75d6be1a3f2b346 Mon Sep 17 00:00:00 2001 From: cortexmancer Date: Fri, 27 Sep 2024 12:05:02 -0300 Subject: [PATCH] fix: do not define feature test macros for BSD --- cbuild.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cbuild.sh b/cbuild.sh index 5dab4de6..75b29278 100755 --- a/cbuild.sh +++ b/cbuild.sh @@ -41,14 +41,14 @@ CFLAGS="\ -Wno-unused-parameter \ -Wno-unused-result \ -Wfatal-errors -std=c99 \ --D_POSIX_C_SOURCE=200809L $CFLAGS" + $CFLAGS" : "${CC:=cc}" : "${PREFIX:=/usr/local}" : "${OS:=$(uname)}" case "$OS" in -*BSD*) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;; -*Darwin*) CFLAGS="$CFLAGS -D_DARWIN_C_SOURCE" ;; +*Darwin*) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200809L -D_DARWIN_C_SOURCE" ;; +*Linux*) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200809L" ;; esac : "${OPTFLAGS:=-O2}"