HDFS-14394: Add -std=c99 / -std=gnu99 to libhdfs compile flags

Signed-off-by: Todd Lipcon <todd@apache.org>
(cherry picked from commit 3b0c5016b2)
This commit is contained in:
Sahil Takiar 2019-04-03 10:55:36 -07:00 committed by Akira Ajisaka
parent 17d18a2a3a
commit eae1387f34
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# Solaris flags. 64-bit compilation is mandatory, and is checked earlier.
hadoop_add_compiler_flags("-m64 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS")
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=gnu++98 ${CMAKE_CXX_FLAGS}")
hadoop_add_linker_flags("-m64")
@ -211,3 +210,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
message(FATAL_ERROR "Unrecognised CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
endif()
endif()
# Set GNU99 as the C standard to use
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")