Commit 2087582d authored by Richard Levitte's avatar Richard Levitte
Browse files

Only implement secure malloc if _POSIX_VERSION allows



Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)

(cherry picked from commit e44c7d02)
parent c3126315
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,7 +24,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>