From aedb75d4f3029a8d94b2316a66bc9cc86095e590 Mon Sep 17 00:00:00 2001 From: MiguelRegueiro Date: Mon, 6 Jul 2026 21:07:01 +0200 Subject: [PATCH 1/2] Fix FreeBSD Wayland build --- glfw/wl_client_side_decorations.c | 10 ++++++++++ kitty/colors.c | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/glfw/wl_client_side_decorations.c b/glfw/wl_client_side_decorations.c index 481d359d8..873066a54 100644 --- a/glfw/wl_client_side_decorations.c +++ b/glfw/wl_client_side_decorations.c @@ -12,6 +12,16 @@ #include #include #include +// Needed for the BTN_* defines +#ifdef __has_include +#if __has_include() +#include +#elif __has_include() +#include +#endif +#else +#include +#endif #define decs window->wl.decorations #define debug debug_rendering diff --git a/kitty/colors.c b/kitty/colors.c index 79b51a3d8..f3e27a045 100644 --- a/kitty/colors.c +++ b/kitty/colors.c @@ -9,8 +9,8 @@ #include #include "colors.h" #include "color-names.h" -#ifdef __APPLE__ -// Needed for strod_l +#if defined(__APPLE__) || defined(__FreeBSD__) +// Needed for strtod_l #include #endif From 0b95d43833c8b95d2a0b3228e5f9db0d383aa739 Mon Sep 17 00:00:00 2001 From: MiguelRegueiro Date: Mon, 6 Jul 2026 21:07:08 +0200 Subject: [PATCH 2/2] Fix Wayland drag source startup on FreeBSD --- glfw/backend_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glfw/backend_utils.c b/glfw/backend_utils.c index e3885bdf2..a322d095f 100644 --- a/glfw/backend_utils.c +++ b/glfw/backend_utils.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef __NetBSD__ #define ppoll pollts