From: Andy Polyakov Date: Sun, 25 Feb 2018 15:56:26 +0000 (+0100) Subject: mem_sec.c: relax POSIX requirement. X-Git-Tag: OpenSSL_1_1_0h~61 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4974a6f21b3e1aee969174fd20e2a68c36237e71;p=oweals%2Fopenssl.git mem_sec.c: relax POSIX requirement. Even though mlock(2) was standardized in POSIX.1-2001, vendors did implement it prior that point. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5460) (cherry picked from commit 5839185cdd9b339ff741da437d964a25e72a3fb6) --- diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c index b626b3d396..c36e392610 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -26,7 +26,9 @@ /* e_os.h includes unistd.h, which defines _POSIX_VERSION */ #if !defined(OPENSSL_NO_SECURE_MEMORY) && defined(OPENSSL_SYS_UNIX) \ - && defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L + && ( (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \ + || defined(__sun) || defined(__hpux) || defined(__sgi) \ + || defined(__osf__) ) # define IMPLEMENTED # include # include