提交 efdb2d6c 编写于 作者: A Andy Polyakov

crypto/o_str.c: add _GNU_SOURCE strerror_r case.

Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 43c4116c
...@@ -263,7 +263,9 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen) ...@@ -263,7 +263,9 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen)
{ {
#if defined(_MSC_VER) && _MSC_VER>=1400 #if defined(_MSC_VER) && _MSC_VER>=1400
return !strerror_s(buf, buflen, errnum); 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 * 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 * gives 1 on success and 0 on failure for consistency with other OpenSSL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册