From 8ee3a6d0c1542dc2db59707e1cc09ddeee498cb0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 13 Jul 2023 02:32:32 +0900 Subject: [PATCH] internal/glfw/glfw/glfw/src: remove warnings for Wayland --- internal/glfw/glfw/glfw/src/wl_init.c | 4 ++++ internal/glfw/glfw/glfw/src/wl_window.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/glfw/glfw/glfw/src/wl_init.c b/internal/glfw/glfw/glfw/src/wl_init.c index 03776e098..2d423dc9e 100644 --- a/internal/glfw/glfw/glfw/src/wl_init.c +++ b/internal/glfw/glfw/glfw/src/wl_init.c @@ -26,6 +26,10 @@ // It is fine to use C99 in this file because it will not be built with VS //======================================================================== +#if !defined(_GNU_SOURCE) + #define _GNU_SOURCE +#endif + #define _POSIX_C_SOURCE 200809L #include "internal.h" diff --git a/internal/glfw/glfw/glfw/src/wl_window.c b/internal/glfw/glfw/glfw/src/wl_window.c index cfd54d498..b5e29be73 100644 --- a/internal/glfw/glfw/glfw/src/wl_window.c +++ b/internal/glfw/glfw/glfw/src/wl_window.c @@ -26,7 +26,9 @@ // It is fine to use C99 in this file because it will not be built with VS //======================================================================== -#define _GNU_SOURCE +#if !defined(_GNU_SOURCE) + #define _GNU_SOURCE +#endif #include "internal.h"