summaryrefslogtreecommitdiff
path: root/test/lsan/TestCases/swapcontext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/lsan/TestCases/swapcontext.cc')
-rw-r--r--test/lsan/TestCases/swapcontext.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/lsan/TestCases/swapcontext.cc b/test/lsan/TestCases/swapcontext.cc
index 9774f6ce4..afce8d9fe 100644
--- a/test/lsan/TestCases/swapcontext.cc
+++ b/test/lsan/TestCases/swapcontext.cc
@@ -6,13 +6,8 @@
// RUN: %env_lsan_opts= not %run %t foo 2>&1 | FileCheck %s
// UNSUPPORTED: arm,powerpc64
+#include "sanitizer_common/sanitizer_ucontext.h"
#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>
const int kStackSize = 1 << 20;