diff options
author | Andy Polyakov <appro@openssl.org> | 2012-11-10 21:24:51 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-11-10 21:24:51 +0100 |
commit | d5630dd60ecdc87f7d326edda4ee3bf39d2df874 (patch) | |
tree | 54cc4cd58480b754f95f91def911789b367593c7 /crypto/ppccap.c | |
parent | bn_word.c: fix overflow bug in BN_add_word. (diff) | |
download | openssl-d5630dd60ecdc87f7d326edda4ee3bf39d2df874.tar.xz openssl-d5630dd60ecdc87f7d326edda4ee3bf39d2df874.zip |
ppccap.c: restrict features on AIX 5.
Diffstat (limited to 'crypto/ppccap.c')
-rw-r--r-- | crypto/ppccap.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/ppccap.c b/crypto/ppccap.c index 531f1b3be8..d7f6354e94 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -4,7 +4,7 @@ #include <setjmp.h> #include <signal.h> #include <unistd.h> -#ifdef __linux +#if defined(__linux) || defined(_AIX) #include <sys/utsname.h> #endif #include <crypto.h> @@ -88,12 +88,14 @@ void OPENSSL_cpuid_setup(void) OPENSSL_ppccap_P = 0; #if defined(_AIX) - if (sizeof(size_t)==4 + if (sizeof(size_t)==4) + { + struct utsname uts; # if defined(_SC_AIX_KERNEL_BITMODE) - && sysconf(_SC_AIX_KERNEL_BITMODE)!=64 + if (sysconf(_SC_AIX_KERNEL_BITMODE)!=64) return; # endif - ) - return; + if (uname(&uts)!=0 || atoi(uts.version)<6)) return; + } #endif memset(&ill_act,0,sizeof(ill_act)); |