Skip to content

Commit 61e55b7

Browse files
author
Matthieu Longo
committed
[solaris][sunpro] -D_REENTRANT is not defined even if we specify -pthread
1 parent 44be647 commit 61e55b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

c/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ endif ()
106106

107107
# Set Compiler extra flags for Solaris when using SunStudio
108108
if (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
109-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt")
109+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mt -D_REENTRANT")
110110
endif()
111111

112112
if (CMAKE_C_COMPILER_ID STREQUAL "SunPro")
113-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt")
113+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mt -D_REENTRANT")
114114
endif()
115115

116116
# Set linker's extra flags for Solaris (used by SunStudio and GCC without discrimination)

0 commit comments

Comments
 (0)