From: martin.jansa@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: [whinlatter][PATCH 6/7] util-linux: backport fix to build with glibc-2.43 on host
Date: Mon, 30 Mar 2026 17:16:15 +0200 [thread overview]
Message-ID: <20260330151620.3835312-6-martin.jansa@gmail.com> (raw)
In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com>
From: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/recipes-core/util-linux/util-linux.inc | 1 +
...x-bsearch-macro-usage-with-glibc-C23.patch | 40 +++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 3135bbb7c6..3bcf681f24 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -21,6 +21,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
file://0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch \
file://0001-tests-helpers-test_sigstate.c-explicitly-reset-SIGIN.patch \
file://0001-include-mount-api-utils-avoid-using-sys-mount.h.patch \
+ file://0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch \
file://CVE-2025-14104-01.patch \
file://CVE-2025-14104-02.patch \
"
diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch
new file mode 100644
index 0000000000..6194594f7f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch
@@ -0,0 +1,40 @@
+From 710a6989e0fc6dfc9290e2639022d1dbf429557f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <cristian@rodriguez.im>
+Date: Sat, 22 Nov 2025 10:41:08 -0300
+Subject: [PATCH] lsfd: fix bsearch macro usage with glibc C23
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+C23 requires bsearch to be a const preserving macro, build now fails
+with
+
+../lsfd-cmd/lsfd.c:1879:75: error: macro ‘bsearch’ passed 6 arguments, but takes just 5
+ 1879 | nfds, sizeof(struct pollfd), pollfdcmp))
+ | ^
+In file included from ../include/c.h:17,
+ from ../lsfd-cmd/lsfd.c:48:
+/usr/include/stdlib.h:987:10: note: macro ‘bsearch’ defined here
+ 987 | # define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \
+
+ add parenthesis around expression to fix it.
+
+Upstream-Status: Backport [2.42 https://github.com/util-linux/util-linux/commit/711bda1441561bfd2eb6d45fe0bc789535c1f1a8]
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ lsfd-cmd/lsfd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c
+index 75cd1de..9aae240 100644
+--- a/lsfd-cmd/lsfd.c
++++ b/lsfd-cmd/lsfd.c
+@@ -1836,7 +1836,7 @@ static void mark_poll_fds_as_multiplexed(char *buf,
+ struct file *file = list_entry(f, struct file, files);
+ if (is_opened_file(file) && !file->multiplexed) {
+ int fd = file->association;
+- if (bsearch(&(struct pollfd){.fd = fd,}, local.iov_base,
++ if (bsearch((&(struct pollfd){.fd = fd,}), local.iov_base,
+ nfds, sizeof(struct pollfd), pollfdcmp))
+ file->multiplexed = 1;
+ }
next prev parent reply other threads:[~2026-03-30 15:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 15:16 [whinlatter][PATCH 1/7] dtc: backport fix for build with glibc-2.43 martin.jansa
2026-03-30 15:16 ` [whinlatter][PATCH 2/7] pseudo: Add fix for glibc 2.43 martin.jansa
2026-03-30 15:16 ` [whinlatter][PATCH 3/7] yocto-uninative: Update to 5.1 " martin.jansa
2026-03-30 15:16 ` [whinlatter][PATCH 4/7] m4: backport 3 gnulib changes to fix build with glibc-2.43 on host martin.jansa
2026-03-30 15:16 ` [whinlatter][PATCH 5/7] gettext: backport " martin.jansa
2026-03-30 15:16 ` martin.jansa [this message]
2026-03-30 15:16 ` [whinlatter][PATCH 7/7] systemd: backport fix to " martin.jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260330151620.3835312-6-martin.jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox