Skip to content

Commit 4227f19

Browse files
author
Matthieu Longo
committed
[solaris] fix -Werror=implicit-function-declaration on getopt()
1 parent ea8fbf8 commit 4227f19

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

proton-c/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ if (CMAKE_COMPILER_IS_GNUCC)
251251
set (COMPILE_WARNING_FLAGS "${CXX_WARNING_FLAGS}")
252252
endif (NOT BUILD_WITH_CXX)
253253

254+
if (CMAKE_HOST_SOLARIS)
255+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__")
256+
endif (CMAKE_HOST_SOLARIS)
257+
254258
if (ENABLE_UNDEFINED_ERROR)
255259
if (CMAKE_HOST_SOLARIS)
256260
set (CATCH_UNDEFINED "-zdefs")
@@ -292,6 +296,7 @@ set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS}" PARENT_SCOPE)
292296
set(COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS}" PARENT_SCOPE)
293297
set(COMPILE_LANGUAGE_FLAGS "${COMPILE_LANGUAGE_FLAGS}" PARENT_SCOPE)
294298
set(LINK_TIME_OPTIMIZATION "${LTO}" PARENT_SCOPE)
299+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE)
295300

296301
if (MSVC)
297302
set(CMAKE_DEBUG_POSTFIX "d")

0 commit comments

Comments
 (0)