From e3b41e1cf108b5dab104cb0f7b1a3b32729c25f8 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:44:51 +0000 Subject: [PATCH 1/3] Fix `time.h` includes missing `_GNU_SOURCE` --- examples/particles.c | 2 ++ src/posix_time.c | 2 ++ src/wl_init.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/examples/particles.c b/examples/particles.c index baafe826..7a896a62 100644 --- a/examples/particles.c +++ b/examples/particles.c @@ -24,6 +24,8 @@ // //======================================================================== +#define _GNU_SOURCE + #if defined(_MSC_VER) // Make MS math.h define M_PI #define _USE_MATH_DEFINES diff --git a/src/posix_time.c b/src/posix_time.c index 4d7bd7ce..2d2b1561 100644 --- a/src/posix_time.c +++ b/src/posix_time.c @@ -25,6 +25,8 @@ // //======================================================================== +#define _GNU_SOURCE + #include "internal.h" #if defined(GLFW_BUILD_POSIX_TIMER) diff --git a/src/wl_init.c b/src/wl_init.c index 76054bc6..cba68bad 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -24,6 +24,8 @@ // //======================================================================== +#define _GNU_SOURCE + #include "internal.h" #if defined(_GLFW_WAYLAND) From 80b77131269b44c9fa2d8259c7a0cd9e8ea0ec42 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:49:43 +0000 Subject: [PATCH 2/3] Fix `linux/input-event-codes.h` when not present --- src/wl_window.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wl_window.c b/src/wl_window.c index 2e842aaa..f4f1b5df 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -40,7 +40,9 @@ #include #include #include +#if __has_include() #include +#endif #include "wayland-client-protocol.h" #include "xdg-shell-client-protocol.h" From eb96b4aad539015c5dbeac8dd9b55abb0f699066 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:59:44 +0000 Subject: [PATCH 3/3] Last missing `_GNU_SOURCE` --- src/linux_joystick.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/linux_joystick.c b/src/linux_joystick.c index d8a916b0..02fd8232 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -25,6 +25,8 @@ // //======================================================================== +#define _GNU_SOURCE + #include "internal.h" #if defined(GLFW_BUILD_LINUX_JOYSTICK)