From 2087582d0455111d6627a142668fdf0ebff1d89f 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) (cherry picked from commit e44c7d02ddac975ec6abff7901e77a0c37f9949d) --- 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 341347b0ea..b26ba20a62 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -24,7 +24,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