Define _POSIX_C_SOURCE=200809L

This enables thread-safe errno on Solaris and its descendants.

Fixes #5611
This commit is contained in:
ridiculousfish 2019-02-20 12:58:59 -08:00
parent 11a1403219
commit 334eec94f8

View file

@ -129,11 +129,14 @@ SET_SOURCE_FILES_PROPERTIES(src/fish_version.cpp
OPTION(INTERNAL_WCWIDTH "use fallback wcwidth" ON)
IF(INTERNAL_WCWIDTH)
add_definitions(-DHAVE_BROKEN_WCWIDTH=1)
ADD_DEFINITIONS(-DHAVE_BROKEN_WCWIDTH=1)
ELSE()
add_definitions(-DHAVE_BROKEN_WCWIDTH=0)
ADD_DEFINITIONS(-DHAVE_BROKEN_WCWIDTH=0)
ENDIF()
# Enable thread-safe errno on Solaris (#5611)
ADD_DEFINITIONS(-D_POSIX_C_SOURCE=200809L)
# Set up PCRE2
INCLUDE(cmake/PCRE2.cmake)