kaniini / libucontext

ucontext implementation featuring glibc-compatible ABI
Other
106 stars 41 forks source link

Set _XOPEN_SOURCE when building on Darwin #47

Closed lpereira closed 3 months ago

lpereira commented 2 years ago

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.

(I don't have an ARM Darwin system; this is just a speculative fix from looking at a build log that has been sent to me for a personal project.)

kaniini commented 2 years ago

On anything other than musl libc, the build should ideally be a freestanding one.

kaniini commented 3 months ago

Merged, thanks!