package/wlroots: fix build with libinput 1.31
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/3fcfe01d70cb0f8f350cd6bb1bda914fc7fc8609
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master
Buildroot commit 0433c8d02af803de90b41c42bb41bbc9f2d436ff bumped libinput to version 1.31.0 which causes a build error with wlroot:
../backend/libinput/switch.c: In function ‘handle_switch_toggle’:../backend/libinput/switch.c:32:9: error: enumeration value
‘LIBINPUT_SWITCH_KEYPAD_SLIDE’ not handled in switch [-Werror=switch]
32 | switch (libinput_event_switch_get_switch(sevent)) {
The build error was not yet detected by the autobuilders but can be reproduced using this defconfig:
BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_WLROOTS=y
--- ...end-libinput-fix-build-with-libinput-1.31.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+)
package/wlroots/0001-backend-libinput-fix-build-with-libinput-1.31.patch new file +51 -0
@@ -0,0 +1,51 @@ +From c1452d88114710f5772662b1d8efb9c71edaa34c Mon Sep 17 00:00:00 2001 +From: Aleksei Bavshin <[email protected]> +Date: Sat, 7 Feb 2026 17:48:16 -0800 +Subject: [PATCH] backend/libinput: fix build with libinput 1.31 + +Upstream: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/c1452d88114710f5772662b1d8efb9c71edaa34c + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + backend/libinput/meson.build | 4 ++++ + backend/libinput/switch.c | 5 +++++ + 2 files changed, 9 insertions(+) + +diff --git a/backend/libinput/meson.build b/backend/libinput/meson.build +index c244eb77a..091b0e0eb 100644 +--- a/backend/libinput/meson.build ++++ b/backend/libinput/meson.build +@@ -29,3 +29,7 @@ features += { 'libinput-backend': true } + wlr_deps += libinput + + internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0')) ++internal_config.set10( ++ 'HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE', ++ libinput.version().version_compare('>=1.30.901') ++) +diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c +index abeec86d7..9dde3c9cb 100644 +--- a/backend/libinput/switch.c ++++ b/backend/libinput/switch.c +@@ -2,6 +2,7 @@ + #include <libinput.h> + #include <wlr/interfaces/wlr_switch.h> + #include "backend/libinput.h" ++#include "config.h" + + const struct wlr_switch_impl libinput_switch_impl = { + .name = "libinput-switch", +@@ -36,6 +37,10 @@ void handle_switch_toggle(struct libinput_event *event, + case LIBINPUT_SWITCH_TABLET_MODE: + wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE; + break; ++#if HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE ++ case LIBINPUT_SWITCH_KEYPAD_SLIDE: ++ return; ++#endif + } + switch (libinput_event_switch_get_switch_state(sevent)) { + case LIBINPUT_SWITCH_STATE_OFF: +-- +GitLab +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot