summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/mem_sec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index 0c24ed819b..87c19a1395 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -20,7 +20,9 @@
#include <string.h>
-#if defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX)
+/* e_os.h includes unistd.h, which defines _POSIX_VERSION */
+#if defined(OPENSSL_SYS_UNIX) \
+ && defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
# define IMPLEMENTED
# include <stdlib.h>
# include <assert.h>