From 7b18d0aa15b7d7e7afe85e34386ee89cffc82b74 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Tue, 20 Jul 2021 02:27:40 +0000 Subject: [PATCH] sunos,cmake: use thread-safe errno On illumos, the global errno variable is not thread-safe by default, requiring that the application be built with gcc's -pthread option, or that it defines -D_REENTRANT. This was done already for the autotools build, but not for CMake. PR-URL: https://github.com/libuv/libuv/pull/3243 Reviewed-By: Jameson Nash --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7ba9e91..148d0e68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -325,7 +325,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS400") endif() if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") - list(APPEND uv_defines __EXTENSIONS__ _XOPEN_SOURCE=500) + list(APPEND uv_defines __EXTENSIONS__ _XOPEN_SOURCE=500 _REENTRANT) list(APPEND uv_libraries kstat nsl sendfile socket) list(APPEND uv_sources src/unix/no-proctitle.c