Set _XOPEN_SOURCE when building on Darwin
ci/woodpecker/push/woodpecker Pipeline was successful Details

On non-freestanding builds, including <ucontext.h> on an ARM Darwin
system will produce the following error:

  In file included from include/libucontext/bits.h:6:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/
	usr/include/ucontext.h:51:2: error: The deprecated
	ucontext routines require _XOPEN_SOURCE to be defined

Defining this macro on Darwin systems will make the building pass.
master
L. Pereira 2022-07-21 19:00:46 -07:00 committed by Ariadne Conill
parent 4975ba9051
commit 7badd2d5b2
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ ifneq ($(shell uname),Darwin)
else else
# Darwin does not support aliases # Darwin does not support aliases
EXPORT_UNPREFIXED := no EXPORT_UNPREFIXED := no
CPPFLAGS += -D_XOPEN_SOURCE
endif endif
FREESTANDING := no FREESTANDING := no