Async error handling and MacOS/X fixes
[openssl.git] / crypto / async / async_locl.h
index a463bf1c229e9b49c1716f26c42269011ebd9879..ffb34f82e50982cce47080316b4ac01366d9ddd2 100644 (file)
  * ====================================================================
  */
 
+/*
+ * Must do this before including any header files, because on MacOS/X <stlib.h>
+ * includes <signal.h> which includes <ucontext.h>
+ */
+#if defined(__APPLE__) && defined(__MACH__) && !defined(_XOPEN_SOURCE)
+# define _XOPEN_SOURCE          /* Otherwise incomplete ucontext_t structure */
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
 #include <openssl/async.h>
 #include <openssl/crypto.h>