Linux: Fix missing feature macro for using strdup

This adds _XOPEN_SOURCE = 500.

Fixes #1055.
master
Camilla Löwy ago%!(EXTRA string=8 years)
parent 549308051d
commit 079518617c
  1. 1
      README.md
  2. 4
      src/CMakeLists.txt

@ -202,6 +202,7 @@ information on what to include when reporting a bug.
- [Linux] Bugfix: Event processing did not detect joystick disconnection (#932)
- [Linux] Bugfix: The joystick device path could be truncated (#1025)
- [Linux] Bugfix: `glfwInit` would fail if inotify creation failed (#833)
- [Linux] Bugfix: `strdup` was used without any required feature macro (#1055)
- [Cocoa] Added support for Vulkan window surface creation via
[MoltenVK](https://moltengl.com/moltenvk/) (#870)
- [Cocoa] Added support for loading a `MainMenu.nib` when available

@ -74,7 +74,9 @@ set_target_properties(glfw PROPERTIES
POSITION_INDEPENDENT_CODE ON
FOLDER "GLFW3")
target_compile_definitions(glfw PRIVATE -D_GLFW_USE_CONFIG_H)
target_compile_definitions(glfw PRIVATE
-D_GLFW_USE_CONFIG_H
$<$<BOOL:${UNIX}>:_XOPEN_SOURCE=500>)
target_include_directories(glfw PUBLIC
$<BUILD_INTERFACE:${GLFW_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)

Loading…
Cancel
Save