mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Jules Maselbas" <jmaselbas@zdiv.net>
To: "Ahmad Fatoum" <a.fatoum@pengutronix.de>, <barebox@lists.infradead.org>
Cc: "Khem Raj" <raj.khem@gmail.com>, "Enrico Jörns" <ejo@pengutronix.de>
Subject: Re: [PATCH RFT v3] scripts: define _GNU_SOURCE for all source files
Date: Wed, 05 Feb 2025 11:31:29 +0100	[thread overview]
Message-ID: <D7KFYN803WNQ.BOAE8FUKU416@zdiv.net> (raw)
In-Reply-To: <20250127195109.3928003-1-a.fatoum@pengutronix.de>

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@mail.gmail.com/
> Fixes: 5171f4d0696f ("scripts: implement read_fd and pread_full for tools")
> Suggested-by: Khem Raj <raj.khem@gmail.com>
> Reported-by: Enrico Jörns <ejo@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> @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@pengutronix.de/T/#u
> ---



      parent reply	other threads:[~2025-02-05 10:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 19:51 Ahmad Fatoum
2025-01-27 20:00 ` Khem Raj
2025-01-27 20:15   ` Ahmad Fatoum
2025-01-28 10:05 ` Sascha Hauer
2025-01-28 11:28 ` Enrico Jörns
2025-02-05 10:31 ` Jules Maselbas [this message]

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=D7KFYN803WNQ.BOAE8FUKU416@zdiv.net \
    --to=jmaselbas@zdiv.net \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ejo@pengutronix.de \
    --cc=raj.khem@gmail.com \
    /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