diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5acac0d0..7b84ecf2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -316,10 +316,8 @@ if (MSVC90) endif() # Workaround for -std=c99 on Linux disabling _DEFAULT_SOURCE (POSIX 2008 and more) -if (GLFW_BUILD_X11 OR GLFW_BUILD_WAYLAND) - if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - target_compile_definitions(glfw PRIVATE _DEFAULT_SOURCE) - endif() +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_compile_definitions(glfw PRIVATE _DEFAULT_SOURCE) endif() if (GLFW_BUILD_SHARED_LIBRARY) diff --git a/src/posix_time.h b/src/posix_time.h index 94374adb..f27027e6 100644 --- a/src/posix_time.h +++ b/src/posix_time.h @@ -29,6 +29,7 @@ #include #include +#include // POSIX-specific global timer data