commit:     e303fa66ac1d3fb7581c20f05d70f004295383ef
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun Dec 31 21:57:37 2023 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 12:06:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e303fa66

gui-wm/hyprland: add patch for gcc14

Closes: https://bugs.gentoo.org/921123
Closes: https://github.com/gentoo/gentoo/pull/34588
Signed-off-by: Julien Roy <julien <AT> jroy.ca>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 gui-wm/hyprland/files/gcc14.patch      | 32 ++++++++++++++++++++++++++++++++
 gui-wm/hyprland/hyprland-0.33.1.ebuild |  4 ++++
 2 files changed, 36 insertions(+)

diff --git a/gui-wm/hyprland/files/gcc14.patch 
b/gui-wm/hyprland/files/gcc14.patch
new file mode 100644
index 000000000000..1bebe9e9d4c4
--- /dev/null
+++ b/gui-wm/hyprland/files/gcc14.patch
@@ -0,0 +1,32 @@
+# From: 
https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/f3e1f7b2a70a500b740bfc406e893eba0852699a
+diff --git a/subprojects/wlroots/backend/libinput/tablet_pad.c 
b/subprojects/wlroots/backend/libinput/tablet_pad.c
+index 2e74022a..e5327528 100644
+--- a/subprojects/wlroots/backend/libinput/tablet_pad.c
++++ b/subprojects/wlroots/backend/libinput/tablet_pad.c
+@@ -33,7 +33,7 @@ static void add_pad_group_from_libinput(struct 
wlr_tablet_pad *pad,
+                       ++group->ring_count;
+               }
+       }
+-      group->rings = calloc(sizeof(unsigned int), group->ring_count);
++      group->rings = calloc(group->ring_count, sizeof(unsigned int));
+       if (group->rings == NULL) {
+               goto group_fail;
+       }
+@@ -50,7 +50,7 @@ static void add_pad_group_from_libinput(struct 
wlr_tablet_pad *pad,
+                       ++group->strip_count;
+               }
+       }
+-      group->strips = calloc(sizeof(unsigned int), group->strip_count);
++      group->strips = calloc(group->strip_count, sizeof(unsigned int));
+       if (group->strips == NULL) {
+               goto group_fail;
+       }
+@@ -66,7 +66,7 @@ static void add_pad_group_from_libinput(struct 
wlr_tablet_pad *pad,
+                       ++group->button_count;
+               }
+       }
+-      group->buttons = calloc(sizeof(unsigned int), group->button_count);
++      group->buttons = calloc(group->button_count, sizeof(unsigned int));
+       if (group->buttons == NULL) {
+               goto group_fail;
+       }

diff --git a/gui-wm/hyprland/hyprland-0.33.1.ebuild 
b/gui-wm/hyprland/hyprland-0.33.1.ebuild
index 049bd8915031..5c3cf3abef5f 100644
--- a/gui-wm/hyprland/hyprland-0.33.1.ebuild
+++ b/gui-wm/hyprland/hyprland-0.33.1.ebuild
@@ -77,6 +77,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}/gcc14.patch"
+)
+
 pkg_setup() {
        [[ ${MERGE_TYPE} == binary ]] && return
 

Reply via email to