Explorar o código

common: error: Fix for Android.

bunnei %!s(int64=3) %!d(string=hai) anos
pai
achega
cdbab60bbb
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/common/error.cpp

+ 2 - 1
src/common/error.cpp

@@ -30,7 +30,8 @@ std::string NativeErrorToString(int e) {
     return ret;
 #else
     char err_str[255];
-#if defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600))
+#if defined(ANDROID) ||                                                                            \
+    (defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)))
     // Thread safe (GNU-specific)
     const char* str = strerror_r(e, err_str, sizeof(err_str));
     return std::string(str);