Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4] package/which: fix getopt prototype for GCC 15
Date: Sun, 31 May 2026 08:09:43 +0200	[thread overview]
Message-ID: <ahvQc8ZxTUgP4HvY@windsurf> (raw)
In-Reply-To: <20260311092713.17598-1-chakrabortyshubham66@gmail.com>

On Wed, Mar 11, 2026 at 02:57:13PM +0530, Shubham Chakraborty wrote:
> Older C standards allowed empty parentheses in function declarations,
> but GCC 15 enforces C23 semantics where extern int getopt() is
> equivalent to extern int getopt(void), which conflicts with the
> typed prototype provided by system headers (e.g. musl's unistd.h).
> 
> Fix by providing the full prototype in the non-GNU fallback branch,
> matching the standard getopt() signature.
> 
> Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>

Which configuration fails to build? We have no failures in our
autobuilders, and I could not reproduce.

> ---
>  ...hich-fix-getopt-prototype-for-GCC-15.patch | 34 +++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 package/which/0001-package-which-fix-getopt-prototype-for-GCC-15.patch
> 
> diff --git a/package/which/0001-package-which-fix-getopt-prototype-for-GCC-15.patch b/package/which/0001-package-which-fix-getopt-prototype-for-GCC-15.patch
> new file mode 100644
> index 0000000000..afae321ce7
> --- /dev/null
> +++ b/package/which/0001-package-which-fix-getopt-prototype-for-GCC-15.patch
> @@ -0,0 +1,34 @@
> +From f1d07e5630628a7d218936b3ac3292daf6a7ba77 Mon Sep 17 00:00:00 2001
> +From: Shubham Chakraborty <chakrabortyshubham66@gmail.com>
> +Date: Mon, 9 Mar 2026 21:43:58 +0530
> +Subject: [PATCH] package/which: fix getopt prototype for GCC 15
> +
> +Older C standards allowed empty parentheses in function declarations,
> +but GCC 15 enforces C23 semantics where extern int getopt() is
> +equivalent to extern int getopt(void), which conflicts with the
> +typed prototype provided by system headers (e.g. musl's unistd.h).
> +
> +Fix by providing the full prototype in the non-GNU fallback branch,
> +matching the standard getopt() signature.
> +
> +Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com>

We only accept patches that are submitted upstream and therefore carry
and Upstream: tag pointing to the upstream submission.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2026-05-31  6:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11  9:27 [Buildroot] [PATCH v4] package/which: fix getopt prototype for GCC 15 Shubham Chakraborty
2026-05-31  6:09 ` Thomas Petazzoni via buildroot [this message]
     [not found]   ` <ahvu3dxZGAj2X-lO@fedora>
2026-06-01 15:41     ` Shubham Chakraborty

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=ahvQc8ZxTUgP4HvY@windsurf \
    --to=buildroot@buildroot.org \
    --cc=chakrabortyshubham66@gmail.com \
    --cc=thomas.petazzoni@bootlin.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