From b28818f71fe30ceecffc3490c82f7ab6aa3e4d55 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Wed, 24 Apr 2024 00:10:49 +0200 Subject: [PATCH 1/2] Remove warning/errors about undefined functions see #359 features.h needs `_GNU_SOURCE` to be set to allow stdlib.h to declare the functions. --- v3.3/glfw/build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3.3/glfw/build.go b/v3.3/glfw/build.go index 14a7ef3e..6ee6c434 100644 --- a/v3.3/glfw/build.go +++ b/v3.3/glfw/build.go @@ -26,8 +26,8 @@ package glfw // Linux Build Tags // ---------------- // GLFW Options: -#cgo linux,!wayland CFLAGS: -D_GLFW_X11 -#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND +#cgo linux,!wayland CFLAGS: -D_GLFW_X11 -D_GNU_SOURCE +#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND -D_GNU_SOURCE // Linker Options: #cgo linux,!gles1,!gles2,!gles3,!vulkan LDFLAGS: -lGL From 23bba3a4c89646aa52826de643bfde2a8e4cfe98 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 3 May 2024 09:28:23 +0200 Subject: [PATCH 2/2] Only use _GNU_SOURCE for Wayland --- v3.3/glfw/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3.3/glfw/build.go b/v3.3/glfw/build.go index 6ee6c434..4a00f2eb 100644 --- a/v3.3/glfw/build.go +++ b/v3.3/glfw/build.go @@ -26,7 +26,7 @@ package glfw // Linux Build Tags // ---------------- // GLFW Options: -#cgo linux,!wayland CFLAGS: -D_GLFW_X11 -D_GNU_SOURCE +#cgo linux,!wayland CFLAGS: -D_GLFW_X11 #cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND -D_GNU_SOURCE // Linker Options: