ayushtkn commented on code in PR #8166:
URL: https://github.com/apache/hadoop/pull/8166#discussion_r2678374938


##########
hadoop-common-project/hadoop-common/src/main/native/src/exception.c:
##########
@@ -110,15 +110,18 @@ jthrowable newIOException(JNIEnv* env, const char *fmt, 
...)
 
 const char* terror(int errnum)
 {
-// MT-Safe under Solaris or glibc >= 2.32 not supporting sys_errlist/sys_nerr
-#if defined(__sun)
-  #define USE_STR_ERROR
-#elif defined(__GLIBC_PREREQ)
-  #if __GLIBC_PREREQ(2, 32)
-    #define USE_STR_ERROR
+/* STD_ERROR is the new standard. Alpine musc does not want to be 'detected' 
it want to be pure and modern. Thus we detect the old glib and handle. */  
+#ifdef __GLIBC__
+  #if defined(__GLIBC_PREREQ)
+    #if __GLIBC_PREREQ(2, 32)
+      #define USE_STR_ERROR
+    #endif
   #endif
+#else
+  #define USE_STR_ERROR
 #endif
 
+
 #if defined(USE_STR_ERROR)
   return strerror(errnum); 

Review Comment:
   are we overlapping with:
   https://github.com/apache/hadoop/pull/8151
   
   @edwardcapriolo can you check once?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to