From 90648ea3e55125a5a819b32106da6462da310da6 Mon Sep 17 00:00:00 2001 From: Olivier Valentin Date: Tue, 16 Jul 2024 22:34:02 +0200 Subject: [PATCH] hurd: add includes and macro prerequisites - ptsname() needs _XOPEN_SOURCE >= 500 - setenv needs _POSIX_C_SOURCE >= 200112 - setgroups needs grp.h --- CMakeLists.txt | 1 + src/unix/process.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c808b8..d16cf76f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -307,6 +307,7 @@ if(APPLE) endif() if(CMAKE_SYSTEM_NAME STREQUAL "GNU") + list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112 _XOPEN_SOURCE=500) list(APPEND uv_libraries dl) list(APPEND uv_sources src/unix/bsd-ifaddrs.c diff --git a/src/unix/process.c b/src/unix/process.c index bc73cb69..f2038f2c 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -55,7 +55,8 @@ extern char **environ; #endif -#if defined(__linux__) +#if defined(__linux__) || \ + defined(__GNU__) # include #endif