From 3b0c5016b2931e3b87153c1cf368314d229e79ff Mon Sep 17 00:00:00 2001 From: Sahil Takiar Date: Wed, 3 Apr 2019 10:55:36 -0700 Subject: [PATCH] HDFS-14394: Add -std=c99 / -std=gnu99 to libhdfs compile flags Signed-off-by: Todd Lipcon --- hadoop-common-project/hadoop-common/HadoopCommon.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/HadoopCommon.cmake b/hadoop-common-project/hadoop-common/HadoopCommon.cmake index 63de1def32..4de70ac3f7 100644 --- a/hadoop-common-project/hadoop-common/HadoopCommon.cmake +++ b/hadoop-common-project/hadoop-common/HadoopCommon.cmake @@ -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}") \ No newline at end of file