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