aboutsummaryrefslogtreecommitdiff
path: root/crypto/async/arch
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-16 10:38:39 +0000
committerRichard Levitte <levitte@openssl.org>2016-03-16 18:12:56 +0100
commitc521edc3a12042701b2dda93e6bb9855e351c929 (patch)
treedf41419a22717985055398a06a4b66b148562847 /crypto/async/arch
parent685b6f293b4b29bf1ee5c7af19cf1348567828b4 (diff)
downloadopenssl-c521edc3a12042701b2dda93e6bb9855e351c929.zip
openssl-c521edc3a12042701b2dda93e6bb9855e351c929.tar.gz
openssl-c521edc3a12042701b2dda93e6bb9855e351c929.tar.bz2
Some platforms provide getcontext() but it does not work
Some platforms claim to be POSIX but their getcontext() implementation does not work. Therefore we update the ASYNC_is_capable() function to test for this. RT#4366 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/async/arch')
-rw-r--r--crypto/async/arch/async_posix.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c
index 2d9e510..33f2a3f 100644
--- a/crypto/async/arch/async_posix.c
+++ b/crypto/async/arch/async_posix.c
@@ -62,7 +62,13 @@
int ASYNC_is_capable(void)
{
- return 1;
+ ucontext_t ctx;
+
+ /*
+ * Some platforms provide getcontext() but it does not work (notably
+ * MacOSX PPC64). Check for a working getcontext();
+ */
+ return getcontext(&ctx) == 0;
}
void async_local_cleanup(void)