Tested on alpine linux with musl 1.2.5, and it compiled without issue On Mon Jan 27, 2025 at 8:51 PM CET, Ahmad Fatoum wrote: > musl doesn't define loff_t, unless _GNU_SOURCE is defined, which > we don't do everywhere and glibc didn't mind. > > This led 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"). > > To fix this issue for good, let's define _GNU_SOURCE globally for all files. > > Link: https://lore.kernel.org/all/CAMKF1sqX7gFCEH78fHS+jkUSieL5crAU_RwAUO-daJL0u+fj0g@xxxxxxxxxxxxxx/ > Fixes: 5171f4d0696f ("scripts: implement read_fd and pread_full for tools") > Suggested-by: Khem Raj <raj.khem@xxxxxxxxx> > Reported-by: Enrico Jörns <ejo@xxxxxxxxxxxxxx> > Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > --- > @Enrico, please give this a test. I only tested against glibc. > > v2 -> v3: > - set _GNU_SOURCE instead of defining loff_t (Khem) > v1 -> v2: > - include <linux/types.h> from scripts/common.h (Enrico) > v2 was here: > https://lore.barebox.org/barebox/20250127143146.2965544-1-a.fatoum@xxxxxxxxxxxxxx/T/#u > ---