aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/test/sanitizer_common/sanitizer_ucontext.h
blob: d7882fd7f4ed24bf9fdd0d5598909f1e11e6f07d (plain)
1
2
3
4
5
6
7
8
9
10
11
#ifdef __APPLE__
// ucontext.h is deprecated on macOS, so tests that include it may stop working
// someday. We define _XOPEN_SOURCE to keep using ucontext.h for now.
#ifdef _STRUCT_UCONTEXT
#error incomplete ucontext_t already defined, change #include order
#endif
#define _XOPEN_SOURCE 700
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

#include <ucontext.h>