[lsan] Allow using ucontext.h in the test on OSX.

llvm-svn: 213523
This commit is contained in:
Alexander Potapenko 2014-07-21 13:35:09 +00:00
parent 68c3747efb
commit 96008ea849
1 changed files with 5 additions and 0 deletions

View File

@ -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>