فهرست منبع

Linux: Fix POSIX version not set for Null build

When compiling GLFW on Linux with only the Null platform enabled, the
CMake files did not set the required POSIX version macro.

Fixes #2402
Camilla Löwy 1 سال پیش
والد
کامیت
d9709904fe
2فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 1 0
      CONTRIBUTORS.md
  2. 2 4
      src/CMakeLists.txt

+ 1 - 0
CONTRIBUTORS.md

@@ -215,6 +215,7 @@ video tutorials.
  - Dmitri Shuralyov
  - Dmitri Shuralyov
  - Joao da Silva
  - Joao da Silva
  - Daniel Sieger
  - Daniel Sieger
+ - Daljit Singh
  - Michael Skec
  - Michael Skec
  - Daniel Skorupski
  - Daniel Skorupski
  - Slemmie
  - Slemmie

+ 2 - 4
src/CMakeLists.txt

@@ -316,10 +316,8 @@ if (MSVC90)
 endif()
 endif()
 
 
 # Workaround for -std=c99 on Linux disabling _DEFAULT_SOURCE (POSIX 2008 and more)
 # 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()
 endif()
 
 
 if (GLFW_BUILD_SHARED_LIBRARY)
 if (GLFW_BUILD_SHARED_LIBRARY)