Skip to content

Commit f19e4ec

Browse files
authored
Define _REENTRANT for SUNOS (#104527)
This is required to make errno a thread-local variable. See the manpages for errno(3c) and threads(7).
1 parent 2f7ca99 commit f19e4ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/native/configurecompiler.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ elseif(CLR_CMAKE_HOST_SUNOS)
304304
add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
305305
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
306306
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
307-
add_definitions(-D__EXTENSIONS__ -D_XPG4_2 -D_POSIX_PTHREAD_SEMANTICS)
307+
add_definitions(-D__EXTENSIONS__ -D_XPG4_2 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT)
308308
elseif(CLR_CMAKE_HOST_OSX AND NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
309309
add_definitions(-D_XOPEN_SOURCE)
310310

0 commit comments

Comments
 (0)