From 079518617cdefc4c5b676224b82abb871473a95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 9 Aug 2017 16:15:59 +0200 Subject: [PATCH] Linux: Fix missing feature macro for using strdup This adds _XOPEN_SOURCE = 500. Fixes #1055. --- README.md | 1 + src/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0954d106..41173f0f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 87bd7207..c5af0ec3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 + $<$:_XOPEN_SOURCE=500>) target_include_directories(glfw PUBLIC $ $/include>)