mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
build: enable _GNU_SOURCE on GNU/Hurd
Unconditionally enable _GNU_SOURCE when building on GNU/Hurd; this way it is possible to properly use/rely on GNU extensions e.g. accept4(), memrchr(), and the GNU strerror_r(). Closes #17975
This commit is contained in:
parent
960fb49245
commit
bed83d9d33
2 changed files with 2 additions and 2 deletions
|
|
@ -268,7 +268,7 @@ endif()
|
|||
|
||||
include(PickyWarnings)
|
||||
|
||||
if(CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(CYGWIN OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "_GNU_SOURCE") # Required for accept4(), pipe2(), sendmmsg()
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE") # Apply to all feature checks
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue