Only implement secure malloc if _POSIX_VERSION allows

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
This commit is contained in:
Richard Levitte 2018-01-18 14:05:33 +01:00
parent 4d3c278c1a
commit e44c7d02dd

View File

@ -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>