[Buildroot] [git commit branch/2024.02.x] package/mesa3d-demos: fix build failure on musl
Arnout Vandecappelle
arnout at rnout.be
Fri Apr 11 10:40:25 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=22b7005c741c4c0e46c26dbacaf7720d75599e2e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2024.02.x
Patch has been on upstream main for close to 2 years.
The "uint" use was introduced with [1] and [2], released with
mesa3d-demos 9.0.0 from March 2023, and added to Buildroot with commit
80304d9911 "package/mesa3d-demos: bump version to 9.0.0". The affected
code is built only if Wayland and Vulkan support are enabled, that is:
BR2_PACKAGE_LIBDECOR=y
BR2_PACKAGE_VULKAN_LOADER=y
BR2_PACKAGE_WAYLAND=y
[1] https://gitlab.freedesktop.org/mesa/demos/-/commit/813ebef7671f0e54d1b55be9e15ae5586b2b9eb1
[2] https://gitlab.freedesktop.org/mesa/demos/-/commit/5aaa7faeb4de9497535738830e6ebb8f10071877
Signed-off-by: Fiona Klute (WIWA) <fiona.klute at gmx.de>
Signed-off-by: Julien Olivain <ju.o at free.fr>
(cherry picked from commit cf4f2f858d13aa8be1fc3d3215df66e64e7b57e6)
Signed-off-by: Thomas Perale <thomas.perale at mind.be>
---
...3-vulkan-wsi-use-unsigned-instead-of-uint.patch | 68 ++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/package/mesa3d-demos/0003-vulkan-wsi-use-unsigned-instead-of-uint.patch b/package/mesa3d-demos/0003-vulkan-wsi-use-unsigned-instead-of-uint.patch
new file mode 100644
index 0000000000..160dc9010d
--- /dev/null
+++ b/package/mesa3d-demos/0003-vulkan-wsi-use-unsigned-instead-of-uint.patch
@@ -0,0 +1,68 @@
+From 3f4d5ff34e061f3d47b9cf28bff2fc588d8c5326 Mon Sep 17 00:00:00 2001
+From: psykose <alice at ayaya.dev>
+Date: Thu, 23 Mar 2023 21:18:56 +0000
+Subject: [PATCH] vulkan/wsi: use unsigned instead of uint
+
+uint is not a standard type name and fails to build against musl libc
+
+Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
+Upstream: https://gitlab.freedesktop.org/mesa/demos/-/commit/3f4d5ff34e061f3d47b9cf28bff2fc588d8c5326
+Signed-off-by: Fiona Klute (WIWA) <fiona.klute at gmx.de>
+---
+ src/vulkan/wsi/wayland.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/vulkan/wsi/wayland.c b/src/vulkan/wsi/wayland.c
+index 444d2bb81..5958d283a 100644
+--- a/src/vulkan/wsi/wayland.c
++++ b/src/vulkan/wsi/wayland.c
+@@ -128,7 +128,7 @@ dispatch_key(xkb_keycode_t xkb_key, enum wl_keyboard_key_state state)
+ }
+
+ static void
+-handle_key(uint key, enum wl_keyboard_key_state state)
++handle_key(unsigned key, enum wl_keyboard_key_state state)
+ {
+ xkb_keycode_t xkb_key = key + 8;
+ struct itimerspec timer = {0};
+@@ -151,15 +151,15 @@ handle_key(uint key, enum wl_keyboard_key_state state)
+ }
+
+ static void
+-key(void *data, struct wl_keyboard *keyboard, uint serial,
+- uint time, uint key, enum wl_keyboard_key_state state)
++key(void *data, struct wl_keyboard *keyboard, unsigned serial,
++ unsigned time, unsigned key, enum wl_keyboard_key_state state)
+ {
+ handle_key(key, state);
+ }
+
+ static void
+-modifiers(void *data, struct wl_keyboard *keyboard, uint serial,
+- uint mods_depressed, uint mods_latched, uint mods_locked, uint group)
++modifiers(void *data, struct wl_keyboard *keyboard, unsigned serial,
++ unsigned mods_depressed, unsigned mods_latched, unsigned mods_locked, unsigned group)
+ {
+ xkb_state_update_mask(keyboard_data.xkb_state, mods_depressed, mods_latched,
+ mods_locked, 0, 0, group);
+@@ -184,7 +184,7 @@ keymap(void *data, struct wl_keyboard *keyboard,
+ }
+
+ static void
+-enter(void *data, struct wl_keyboard *keyboard, uint serial,
++enter(void *data, struct wl_keyboard *keyboard, unsigned serial,
+ struct wl_surface *surface, struct wl_array *keys)
+ {
+ uint32_t *key;
+@@ -194,7 +194,7 @@ enter(void *data, struct wl_keyboard *keyboard, uint serial,
+ }
+
+ static void
+-leave(void *data, struct wl_keyboard *keyboard, uint serial,
++leave(void *data, struct wl_keyboard *keyboard, unsigned serial,
+ struct wl_surface *surface)
+ {
+ struct itimerspec timer = {0};
+--
+GitLab
+
More information about the buildroot
mailing list