diff options
-rw-r--r-- | test/lsan/TestCases/swapcontext.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lsan/TestCases/swapcontext.cc b/test/lsan/TestCases/swapcontext.cc index 1bb6057ff..f7e95ed2c 100644 --- a/test/lsan/TestCases/swapcontext.cc +++ b/test/lsan/TestCases/swapcontext.cc @@ -6,6 +6,11 @@ // RUN: not %run %t foo 2>&1 | FileCheck %s #include <stdio.h> +#if defined(__APPLE__) +// Note: ucontext.h is deprecated on OSX, so this test may stop working +// someday. We define _XOPEN_SOURCE to keep using ucontext.h for now. +#define _XOPEN_SOURCE 1 +#endif #include <ucontext.h> #include <unistd.h> |