From 7badd2d5b29d1f591c34ec49abb9f48e8bb49be1 Mon Sep 17 00:00:00 2001 From: "L. Pereira" Date: Thu, 21 Jul 2022 19:00:46 -0700 Subject: [PATCH] Set _XOPEN_SOURCE when building on Darwin On non-freestanding builds, including 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. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index de13a8e..373ed3c 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ ifneq ($(shell uname),Darwin) else # Darwin does not support aliases EXPORT_UNPREFIXED := no + CPPFLAGS += -D_XOPEN_SOURCE endif FREESTANDING := no