* [PATCH master] scripts: include/linux/types.h: define loff_t for musl
@ 2025-01-27 11:15 Ahmad Fatoum
0 siblings, 0 replies; only message in thread
From: Ahmad Fatoum @ 2025-01-27 11:15 UTC (permalink / raw)
To: barebox; +Cc: Enrico Jörns, Ahmad Fatoum
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-27 11:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-27 11:15 [PATCH master] scripts: include/linux/types.h: define loff_t for musl Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox