projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d3c278
)
Only implement secure malloc if _POSIX_VERSION allows
author
Richard Levitte
<levitte@openssl.org>
Thu, 18 Jan 2018 13:05:33 +0000
(14:05 +0100)
committer
Richard Levitte
<levitte@openssl.org>
Thu, 18 Jan 2018 13:05:33 +0000
(14:05 +0100)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5060)
crypto/mem_sec.c
patch
|
blob
|
history
diff --git
a/crypto/mem_sec.c
b/crypto/mem_sec.c
index 0c24ed819bb86b0244fb98912b2f5eddaeadecf9..87c19a1395497283f07f27adc8cdd9e3fc0c391b 100644
(file)
--- a/
crypto/mem_sec.c
+++ b/
crypto/mem_sec.c
@@
-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>