mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] scripts: fix build failure with glibc 2.43
Date: Fri, 13 Mar 2026 11:29:00 +0100	[thread overview]
Message-ID: <20260313102922.1820245-1-a.fatoum@pengutronix.de> (raw)

From: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>

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.

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
Link: https://git.openembedded.org/openembedded-core/commit/meta/recipes-bsp/barebox?id=a217683514e051f996fe5675cf9accd44692f6ab
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Patch from OE-core. If it goes into the next release, it can be dropped
there on update.
--- 
 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 5b0133345bb9..33cea1986df5 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.47.3




             reply	other threads:[~2026-03-13 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 10:29 Ahmad Fatoum [this message]
2026-03-13 11:12 ` Sascha Hauer

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=20260313102922.1820245-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=Hemanth.KumarMD@windriver.com \
    --cc=barebox@lists.infradead.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