HADOOP-17569. Building native code fails on Fedora 33. (#2886)

This commit is contained in:
Masatake Iwasaki 2021-04-15 21:33:18 +09:00 committed by GitHub
parent 9179638017
commit 2717203f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -111,8 +111,8 @@ jthrowable newIOException(JNIEnv* env, const char *fmt, ...)
const char* terror(int errnum)
{
#if defined(__sun)
// MT-Safe under Solaris which doesn't support sys_errlist/sys_nerr
#if defined(__sun) || defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 32)
// MT-Safe under Solaris or glibc >= 2.32 not supporting sys_errlist/sys_nerr
return strerror(errnum);
#else
if ((errnum < 0) || (errnum >= sys_nerr)) {

View File

@ -69,6 +69,8 @@ if(WIN32)
set(OUT_DIR bin)
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
# using old default behavior on GCC >= 10.0
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")
set(OS_DIR ${CMAKE_SOURCE_DIR}/main/native/libhdfs/os/posix)
# IMPORTANT: OUT_DIR MUST be relative to maven's