From e44c7d02ddac975ec6abff7901e77a0c37f9949d Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 18 Jan 2018 14:05:33 +0100 Subject: [PATCH] Only implement secure malloc if _POSIX_VERSION allows Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5060) --- crypto/mem_sec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -#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 # include -- 2.25.1