diff options
author | Andy Polyakov <appro@openssl.org> | 2016-05-27 12:04:09 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-05-27 23:02:56 +0200 |
commit | efdb2d6c797112e58e304d3e5300f169dbb16e95 (patch) | |
tree | 81c78aba82a2ef0fa6f5b57e7573bd915f76faa3 /crypto/o_str.c | |
parent | 43c4116cd7413b3c4ffc8d409eeac5b0262c4358 (diff) |
crypto/o_str.c: add _GNU_SOURCE strerror_r case.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/o_str.c')
-rw-r--r-- | crypto/o_str.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/o_str.c b/crypto/o_str.c index 4e2ef88e61..b0e7524820 100644 --- a/crypto/o_str.c +++ b/crypto/o_str.c @@ -263,7 +263,9 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen) { #if defined(_MSC_VER) && _MSC_VER>=1400 return !strerror_s(buf, buflen, errnum); -#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE +#elif defined(_GNU_SOURCE) + return strerror_r(errnum, buf, buflen) != NULL; +#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) /* * We can use "real" strerror_r. The OpenSSL version differs in that it * gives 1 on success and 0 on failure for consistency with other OpenSSL |