commit:     de671b8024508b1780e4daf5a81a5608a6953a22
Author:     jinqiang zhang <peeweep <AT> 0x0 <DOT> ee>
AuthorDate: Tue Mar 10 00:47:31 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 11 17:32:13 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de671b80

sys-apps/xdg-dbus-proxy: fix build with glibc 2.43

Closes: https://bugs.gentoo.org/970592
Signed-off-by: jinqiang zhang <peeweep <AT> 0x0.ee>
Part-of: https://github.com/gentoo/gentoo/pull/45911
Closes: https://github.com/gentoo/gentoo/pull/45911
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xdg-dbus-proxy-0.1.6-glibc-2.43.patch    | 34 ++++++++++++++++++++++
 .../xdg-dbus-proxy/xdg-dbus-proxy-0.1.6.ebuild     |  6 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git 
a/sys-apps/xdg-dbus-proxy/files/xdg-dbus-proxy-0.1.6-glibc-2.43.patch 
b/sys-apps/xdg-dbus-proxy/files/xdg-dbus-proxy-0.1.6-glibc-2.43.patch
new file mode 100644
index 000000000000..2049e19e8955
--- /dev/null
+++ b/sys-apps/xdg-dbus-proxy/files/xdg-dbus-proxy-0.1.6-glibc-2.43.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/970592
+https://github.com/flatpak/xdg-dbus-proxy/pull/72
+
+From 4ba6f23eaf4026165b28fe029de8ebc79715a7ce Mon Sep 17 00:00:00 2001
+From: Brahmajit Das <[email protected]>
+Date: Wed, 4 Mar 2026 06:27:54 +0530
+Subject: [PATCH] dbus-proxy: fix build with glibc >= 2.43
+
+memchr() returns const void * when passed const input, but the result
+was assigned to guchar *. This triggers
+-Wincompatible-pointer-types-discards-qualifiers when building with
+clang and -Werror.
+
+Make the pointer const to preserve const correctness.
+
+Closes: https://github.com/flatpak/xdg-dbus-proxy/issues/70
+Signed-off-by: Brahmajit Das <[email protected]>
+---
+ dbus-proxy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dbus-proxy.c b/dbus-proxy.c
+index 53d5c01..b32df34 100644
+--- a/dbus-proxy.c
++++ b/dbus-proxy.c
+@@ -133,7 +133,7 @@ add_args (GBytes    *bytes,
+ {
+   gsize data_len, remainder_len;
+   const guchar *data = g_bytes_get_data (bytes, &data_len);
+-  guchar *s;
++  const guchar *s;
+   const guchar *remainder;
+ 
+   remainder = data;

diff --git a/sys-apps/xdg-dbus-proxy/xdg-dbus-proxy-0.1.6.ebuild 
b/sys-apps/xdg-dbus-proxy/xdg-dbus-proxy-0.1.6.ebuild
index b87302868b41..4c7232267f9f 100644
--- a/sys-apps/xdg-dbus-proxy/xdg-dbus-proxy-0.1.6.ebuild
+++ b/sys-apps/xdg-dbus-proxy/xdg-dbus-proxy-0.1.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -27,6 +27,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=(
+       "${FILESDIR}/${P}-glibc-2.43.patch"
+)
+
 src_configure() {
        local emesonargs=(
                -Dinstalled_tests=false

Reply via email to