arch/async_posix.h: improve portability.
authorAndy Polyakov <appro@openssl.org>
Wed, 17 Oct 2018 08:09:33 +0000 (10:09 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 19 Oct 2018 08:29:21 +0000 (10:29 +0200)
{make|swap|get|set}context are removed in POSIX.1-2008, but glibc
apparently keeps providing it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7420)

crypto/async/arch/async_posix.h

index b07c2cb01beb825e452cbb2964f6599ffe7792d8..62449fe60e04ff54c0a2500d7292c98953da5735 100644 (file)
@@ -17,7 +17,8 @@
 
 # include <unistd.h>
 
-# if _POSIX_VERSION >= 200112L
+# if _POSIX_VERSION >= 200112L \
+     && (_POSIX_VERSION < 200809L || defined(__GLIBC__))
 
 # include <pthread.h>