From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: "Enrico Jörns" <ejo@pengutronix.de>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>
Subject: [PATCH master] scripts: include/linux/types.h: define loff_t for musl
Date: Mon, 27 Jan 2025 12:15:09 +0100 [thread overview]
Message-ID: <20250127111509.781706-1-a.fatoum@pengutronix.de> (raw)
musl doesn't define loff_t, but glibc does and both of them define
__linux__. This leads to build errors with musl when code makes it into
scripts/ that uses loff_t. This was already fixed once e.g. in commit
c0d065fb0aa0 ("scripts: bareboximd: remove usage of loff_t").
Instead of playing whack-a-mole in future, let's just define loff_t
for non-glibc builds of scripts/.
Fixes: 5171f4d0696f ("scripts: implement read_fd and pread_full for tools")
Reported-by: Enrico Jörns <ejo@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/include/linux/types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/include/linux/types.h b/scripts/include/linux/types.h
index e81d7e810126..02a330cd4e79 100644
--- a/scripts/include/linux/types.h
+++ b/scripts/include/linux/types.h
@@ -14,7 +14,7 @@ typedef int16_t __s16;
typedef uint8_t __u8;
typedef int8_t __s8;
-#ifndef __linux__
+#ifndef __GLIBC__
typedef long long loff_t;
#endif
--
2.39.5
reply other threads:[~2025-01-27 11:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250127111509.781706-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=ejo@pengutronix.de \
/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