diff options
author | Andy Polyakov <appro@openssl.org> | 2012-10-21 18:25:29 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2012-10-21 18:25:29 +0000 |
commit | aa963813ed19eb4b9bf5805c0cdc6dc4e4e78ad7 (patch) | |
tree | 62f987899018707c6c4cf5fef9d88118ac482923 /crypto/ppccap.c | |
parent | 9a6aff50ff70f19a10bbe1281f99bc5eb192efc7 (diff) |
linux-ppc: make it more robust [from HEAD].
Diffstat (limited to 'crypto/ppccap.c')
-rw-r--r-- | crypto/ppccap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/ppccap.c b/crypto/ppccap.c index f71ba66aa3..531f1b3be8 100644 --- a/crypto/ppccap.c +++ b/crypto/ppccap.c @@ -4,6 +4,9 @@ #include <setjmp.h> #include <signal.h> #include <unistd.h> +#ifdef __linux +#include <sys/utsname.h> +#endif #include <crypto.h> #include <openssl/bn.h> @@ -102,6 +105,10 @@ void OPENSSL_cpuid_setup(void) if (sizeof(size_t)==4) { +#ifdef __linux + struct utsname uts; + if (uname(&uts)==0 && strcmp(uts.machine,"ppc64")==0) +#endif if (sigsetjmp(ill_jmp,1) == 0) { OPENSSL_ppc64_probe(); |