From: Hemanth.KumarMD@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Sundeep.Kokkonda@windriver.com, Randy.MacLeod@windriver.com
Subject: [PATCH v2 6/7] barebox-tools: fix build failure with glibc 2.43
Date: Sun, 8 Mar 2026 08:07:20 -0700 [thread overview]
Message-ID: <20260308150834.2508331-6-Hemanth.KumarMD@windriver.com> (raw)
In-Reply-To: <20260308150834.2508331-1-Hemanth.KumarMD@windriver.com>
From: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
meta/recipes-bsp/barebox/barebox-tools.bb | 2 +
...x-tools-fix-glibc-2.43-openat2-build.patch | 43 +++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 meta/recipes-bsp/barebox/files/0001-barebox-tools-fix-glibc-2.43-openat2-build.patch
diff --git a/meta/recipes-bsp/barebox/barebox-tools.bb b/meta/recipes-bsp/barebox/barebox-tools.bb
index eb327306d9..1459f48db2 100644
--- a/meta/recipes-bsp/barebox/barebox-tools.bb
+++ b/meta/recipes-bsp/barebox/barebox-tools.bb
@@ -2,6 +2,8 @@ SUMMARY = "barebox bootloader tools"
require barebox-common.inc
+SRC_URI += "file://0001-barebox-tools-fix-glibc-2.43-openat2-build.patch"
+
LICENSE = "GPL-2.0-only"
DEPENDS = "bison-native flex-native libusb1"
diff --git a/meta/recipes-bsp/barebox/files/0001-barebox-tools-fix-glibc-2.43-openat2-build.patch b/meta/recipes-bsp/barebox/files/0001-barebox-tools-fix-glibc-2.43-openat2-build.patch
new file mode 100644
index 0000000000..3f42ce76e8
--- /dev/null
+++ b/meta/recipes-bsp/barebox/files/0001-barebox-tools-fix-glibc-2.43-openat2-build.patch
@@ -0,0 +1,43 @@
+barebox: fix build failure with glibc 2.43
+
+glibc 2.43 introduces linux/openat2.h through the fcntl include chain
+(bits/fcntl-linux.h -> linux/openat2.h). This header expects the
+__u64 type to be defined before inclusion.
+
+In barebox scripts/include/linux/types.h the header <fcntl.h> was
+included before the __u64 typedef, causing build failures such as:
+
+ linux/openat2.h:20:9: error: unknown type name '__u64'
+
+Move the inclusion of <fcntl.h> after the typedef definitions so that
+__u64 and related types are defined before linux/openat2.h is parsed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hemanth Kumar <hemanth.kumar@example.com>
+---
+
+ scripts/include/linux/types.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/include/linux/types.h b/scripts/include/linux/types.h
+index 5b01333..33cea19 100644
+--- a/scripts/include/linux/types.h
++++ b/scripts/include/linux/types.h
+@@ -4,7 +4,6 @@
+ #include <stdbool.h>
+ #include <stddef.h>
+ #include <stdint.h>
+-#include <fcntl.h>
+
+ typedef uint64_t __u64;
+ typedef int64_t __s64;
+@@ -15,6 +14,8 @@ typedef int16_t __s16;
+ typedef uint8_t __u8;
+ typedef int8_t __s8;
+
++#include <fcntl.h>
++
+ #ifndef __linux__
+ typedef long long loff_t;
+ #endif
--
2.49.0
next prev parent reply other threads:[~2026-03-08 15:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-08 15:07 [PATCH v2 1/7] glibc: Upgrade to 2.43 release Hemanth.KumarMD
2026-03-08 15:07 ` [PATCH v2 2/7] gettext: Upgrade 0.26 -> 1.0 Hemanth.KumarMD
2026-03-09 6:56 ` [OE-core] " Mathieu Dubois-Briand
2026-03-09 14:50 ` Randy MacLeod
2026-03-08 15:07 ` [PATCH v2 3/7] pseudo: fix for build with glibc-2.43 Hemanth.KumarMD
2026-03-08 16:37 ` [OE-core] " Martin Jansa
2026-04-07 8:54 ` Böszörményi Zoltán
[not found] ` <18A40738790ACBCC.657799@lists.openembedded.org>
2026-04-07 11:39 ` Böszörményi Zoltán
2026-04-07 14:08 ` Martin Jansa
2026-04-07 15:21 ` Böszörményi Zoltán
[not found] ` <18A41C5827F22307.777565@lists.openembedded.org>
2026-04-07 15:38 ` Böszörményi Zoltán
2026-04-08 9:44 ` Paul Barker
2026-03-08 15:07 ` [PATCH v2 4/7] gcc-runtime: avoid discarded-qualifiers build failure with glibc 2.43 Hemanth.KumarMD
2026-03-08 15:07 ` [PATCH v2 5/7] libxcrypt: " Hemanth.KumarMD
2026-03-08 15:07 ` Hemanth.KumarMD [this message]
2026-03-08 15:07 ` [PATCH v2 7/7] ltp: workaround openat2 " Hemanth.KumarMD
2026-03-08 16:58 ` [OE-core] " Mathieu Dubois-Briand
2026-03-09 7:13 ` [OE-core] [PATCH v2 1/7] glibc: Upgrade to 2.43 release Mathieu Dubois-Briand
2026-03-09 13:26 ` Sundeep KOKKONDA
2026-03-09 13:54 ` Richard Purdie
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=20260308150834.2508331-6-Hemanth.KumarMD@windriver.com \
--to=hemanth.kumarmd@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Sundeep.Kokkonda@windriver.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