WASI doesn't support `getcontext`, `setcontext`, or related functions.
"$(SYSROOT_INC)/ulimit.h" \
"$(SYSROOT_INC)/xattr.h" \
"$(SYSROOT_INC)/wordexp.h" \
- "$(SYSROOT_INC)/spawn.h"
+ "$(SYSROOT_INC)/spawn.h" \
+ "$(SYSROOT_INC)/ucontext.h" \
+ "$(SYSROOT_INC)/sys/ucontext.h"
ifeq ($(BUILD_LIBC_BOTTOM_HALF),no)
override CRT_SOURCES = $(BASICS_CRT_SOURCES)
#include <sys/timex.h>
#include <sys/ttydefaults.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <sys/utsname.h>
#include <threads.h>
#include <time.h>
#include <uchar.h>
-#include <ucontext.h>
#include <unistd.h>
#include <utime.h>
#include <values.h>
#define ND_ROUTER_SOLICIT 133
#define NEW_ENV_VALUE 1
#define NEW_ENV_VAR 0
-#define NGREG (sizeof(gregset_t)/sizeof(greg_t))
#define NGROUPS 32
#define NGROUPS_MAX 32
#define NL0 0000000
#define _THREADS_H
#define _TIME_H
#define _UCHAR_H
-#define _UCONTEXT_H
#define _UNISTD_H
#define _UTIME_H
#define _VALUES_H
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|| defined(_BSD_SOURCE)
+#ifdef __wasilibc_unmodified_upstream /* WASI has no ucontext support */
#ifdef _GNU_SOURCE
#define __ucontext ucontext
#endif
+#endif
#define __NEED_size_t
#define __NEED_pid_t