From dd241ae08d497ae8fa1add3e208c4c3bef9a7b79 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Mon, 20 Mar 2017 14:17:23 -0700 Subject: [PATCH] sigchainlib: hopefully fix darwin build breakage. Hopefully fix the following darwin build breakage: MacOSX10.10.sdk/usr/include/ucontext.h:43:2: error: The deprecated ucontext routines require _XOPEN_SOURCE to be defined Bug: http://b/36205469 Bug: http://b/36262089 Change-Id: I172cef3872053e8c3b0d2c428f3f1e2eaf9540dc --- sigchainlib/sigchain.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc index ed6d7cd09..d9d2eaf6f 100644 --- a/sigchainlib/sigchain.cc +++ b/sigchainlib/sigchain.cc @@ -25,7 +25,6 @@ #include #include #include -#include #include @@ -34,8 +33,13 @@ #if defined(__APPLE__) #define _NSIG NSIG #define sighandler_t sig_t + +// Darwin has an #error when ucontext.h is included without _XOPEN_SOURCE defined. +#define _XOPEN_SOURCE #endif +#include + // libsigchain provides an interception layer for signal handlers, to allow ART and others to give // their signal handlers the first stab at handling signals before passing them on to user code. // -- 2.11.0