From: Richard Levitte Date: Thu, 18 Jan 2018 13:05:33 +0000 (+0100) Subject: Only implement secure malloc if _POSIX_VERSION allows X-Git-Tag: OpenSSL_1_1_1-pre1~179 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=e44c7d02ddac975ec6abff7901e77a0c37f9949d;ds=sidebyside Only implement secure malloc if _POSIX_VERSION allows Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/5060) --- 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