commit:     b7184dc69253f6c3beb54acbe779baf0f4b9ec99
Author:     Kostadin Shishmanov <kostadinshishmanov <AT> protonmail <DOT> com>
AuthorDate: Sat Feb 14 13:50:02 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 15 09:50:32 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7184dc6

sys-fs/bees: fix build with glibc 2.43

Backport upstream patch that fixes building with glibc 2.43. Doesn't
break building with glibc 2.42.

Closes: https://bugs.gentoo.org/969300
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45812
Closes: https://github.com/gentoo/gentoo/pull/45812
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/bees/bees-0.11.ebuild                |  6 +++-
 sys-fs/bees/files/bees-0.11-glibc2.43.patch | 48 +++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/sys-fs/bees/bees-0.11.ebuild b/sys-fs/bees/bees-0.11.ebuild
index 08abf5ac6e8c..da240a48979f 100644
--- a/sys-fs/bees/bees-0.11.ebuild
+++ b/sys-fs/bees/bees-0.11.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
@@ -32,6 +32,10 @@ RDEPEND="${DEPEND}"
 CONFIG_CHECK="~BTRFS_FS"
 ERROR_BTRFS_FS="CONFIG_BTRFS_FS: bees does currently only work with btrfs"
 
+PATCHES=(
+       "${FILESDIR}/${PN}-0.11-glibc2.43.patch"
+)
+
 pkg_pretend() {
        if [[ ${MERGE_TYPE} != buildonly ]]; then
                if kernel_is -lt 5 7; then

diff --git a/sys-fs/bees/files/bees-0.11-glibc2.43.patch 
b/sys-fs/bees/files/bees-0.11-glibc2.43.patch
new file mode 100644
index 000000000000..46cd64286f22
--- /dev/null
+++ b/sys-fs/bees/files/bees-0.11-glibc2.43.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/969300
+
+From 14c82dce8a7e9714d6f9cd03229e0fb55460aa25 Mon Sep 17 00:00:00 2001
+From: Zygo Blaxell <[email protected]>
+Date: Wed, 11 Feb 2026 22:23:35 -0500
+Subject: [PATCH] openat2: adjust prototype to match glibc declaration
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+glibc 2.43 has added a prototype for openat2 which conficts
+with the interim prototype from the kernel commits:
+
+Fix by adding the missing `const` on `open_how`.
+
+Fixes: https://github.com/Zygo/bees/issues/333
+Signed-off-by: Zygo Blaxell <[email protected]>
+---
+ include/crucible/openat2.h | 2 +-
+ lib/openat2.cc             | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/crucible/openat2.h b/include/crucible/openat2.h
+index c4081185..6ccb34ef 100644
+--- a/include/crucible/openat2.h
++++ b/include/crucible/openat2.h
+@@ -45,7 +45,7 @@ struct open_how {
+ extern "C" {
+ 
+ /// Weak symbol to support libc with no syscall wrapper
+-int openat2(int dirfd, const char *pathname, struct open_how *how, size_t 
size) throw();
++int openat2(int dirfd, const char *pathname, const struct open_how *how, 
size_t size) throw();
+ 
+ };
+ 
+diff --git a/lib/openat2.cc b/lib/openat2.cc
+index 5b76bb0f..2912f864 100644
+--- a/lib/openat2.cc
++++ b/lib/openat2.cc
+@@ -22,7 +22,7 @@ extern "C" {
+ 
+ int
+ __attribute__((weak))
+-openat2(int const dirfd, const char *const pathname, struct open_how *const 
how, size_t const size)
++openat2(int const dirfd, const char *const pathname, const struct open_how 
*const how, size_t const size)
+ throw()
+ {
+       return syscall(SYS_openat2, dirfd, pathname, how, size);

Reply via email to