[
https://issues.apache.org/jira/browse/HADOOP-19776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050988#comment-18050988
]
ASF GitHub Bot commented on HADOOP-19776:
-----------------------------------------
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?
> trunk pre-commits for native code still try to use Java 8
> ---------------------------------------------------------
>
> Key: HADOOP-19776
> URL: https://issues.apache.org/jira/browse/HADOOP-19776
> Project: Hadoop Common
> Issue Type: Bug
> Components: precommit
> Reporter: Chris Nauroth
> Assignee: Chris Nauroth
> Priority: Major
> Labels: pull-request-available
>
> Even after HADOOP-19773, there are still some precommits trying to use Java 8:
> https://github.com/apache/hadoop/pull/8151#issuecomment-3711644942
> The reason is that the Jenkins pipeline has some optional steps for checking
> cross-platform compatibility on native code patches, and these are still
> using old Java 8 targets.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]