diff options
author | Matt Caswell <matt@openssl.org> | 2016-03-16 10:38:39 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-16 18:12:56 +0100 |
commit | c521edc3a12042701b2dda93e6bb9855e351c929 (patch) | |
tree | df41419a22717985055398a06a4b66b148562847 /crypto/async | |
parent | 685b6f293b4b29bf1ee5c7af19cf1348567828b4 (diff) | |
download | openssl-c521edc3a12042701b2dda93e6bb9855e351c929.tar.gz |
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')
-rw-r--r-- | crypto/async/arch/async_posix.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c index 2d9e5102fc..33f2a3fa1e 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) |