This commit is contained in:
Vitor Santos Costa
2017-11-29 13:47:57 +00:00
parent 8feca162bf
commit 3688819ea2
31 changed files with 2944 additions and 2897 deletions

View File

@@ -294,8 +294,8 @@ const char* jniStrError(int errnum, char* buf, size_t buflen) {
// char *strerror_r(int errnum, char *buf, size_t n);
return strerror_r(errnum, buf, buflen);
#else
int rc = strerror_r(errnum, buf, buflen);
if (rc != 0) {
char *rc = strerror_r(errnum, buf, buflen);
if (rc != NULL) {
// (POSIX only guarantees a value other than 0. The safest
// way to implement this function is to use C++ and overload on the
// type of strerror_r to accurately distinguish GNU from POSIX.)