diff options
author | Alexander Potapenko <glider@google.com> | 2014-07-21 13:35:09 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2014-07-21 13:35:09 +0000 |
commit | a13548a728ab091f4001687c3af8f27b7a8581e6 (patch) | |
tree | 5154673e18553f2797e76523050515a647585700 | |
parent | 2f62767d062520339cabe5ceebf63bd864fc0c69 (diff) | |
download | compiler-rt-a13548a728ab091f4001687c3af8f27b7a8581e6.tar.gz |
[lsan] Allow using ucontext.h in the test on OSX.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213523 91177308-0d34-0410-b5e6-96231b3b80d8
-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> |