diff --git a/examples/particles.c b/examples/particles.c index baafe826a..7a896a62e 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/linux_joystick.c b/src/linux_joystick.c index d8a916b08..02fd82322 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) diff --git a/src/posix_time.c b/src/posix_time.c index 4d7bd7cea..2d2b15618 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 704906381..a51bb3032 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) diff --git a/src/wl_window.c b/src/wl_window.c index 4220d17e0..9610b06a9 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"