summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-10-05 01:05:54 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-10-05 12:23:34 +0200
commit5e130ae6328a4553eaafd7df22a3dcbca1b818b3 (patch)
tree7347e17b6e552120722921a70a7316c20572d23d /e_os.h
parentc11c28052f333ca2fdd921c7f356eebf98b8421a (diff)
test/secmemtest: test secure memory only if it is implemented
Fixes #7322 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7351) (cherry picked from commit 8529b156421805415bc7b17758255394de580c61)
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/e_os.h b/e_os.h
index 8991e6202f..534059382b 100644
--- a/e_os.h
+++ b/e_os.h
@@ -317,8 +317,15 @@ struct servent *getservbyname(const char *name, const char *proto);
# endif
/* end vxworks */
-#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-# define CRYPTO_memcmp memcmp
-#endif
+# ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define CRYPTO_memcmp memcmp
+# endif
+/* unistd.h defines _POSIX_VERSION */
+# if !defined(OPENSSL_NO_SECURE_MEMORY) && defined(OPENSSL_SYS_UNIX) \
+ && ( (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
+ || defined(__sun) || defined(__hpux) || defined(__sgi) \
+ || defined(__osf__) )
+# define OPENSSL_SECURE_MEMORY /* secure memory is implemented */
+# endif
#endif