Skip to content

Commit

Permalink
fix: do not define feature test macros for BSD
Browse files Browse the repository at this point in the history
  • Loading branch information
cortexmancer committed Sep 27, 2024
1 parent faa0ed6 commit dc6a064
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit dc6a064

Please sign in to comment.