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 v2 1/2] package/which: fix getopt implicit prototype conflicting with system headers
Date: Mon, 9 Mar 2026 10:14:04 +0100	[thread overview]
Message-ID: <aa6POBcIqxvNmWDw@windsurf> (raw)
In-Reply-To: <20260309070741.34152-1-chakrabortyshubham66@gmail.com>

Hello,

On Mon, Mar 09, 2026 at 12:37:40PM +0530, Shubham Chakraborty wrote:
> Older C standards allowed empty parentheses in function declarations,
> but modern C (C23) treats extern int getopt() as 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 gcc version broke this?

> diff --git a/package/which/0001-fix-getopt-prototype.patch b/package/which/0001-fix-getopt-prototype.patch
> new file mode 100644
> index 0000000000..af9597242f
> --- /dev/null
> +++ b/package/which/0001-fix-getopt-prototype.patch

You didn't take into account my comments on the patch formatting.

Thanks!

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

  parent reply	other threads:[~2026-03-09  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09  7:07 [Buildroot] [PATCH v2 1/2] package/which: fix getopt implicit prototype conflicting with system headers Shubham Chakraborty
2026-03-09  7:07 ` [Buildroot] [PATCH v2 2/2] DEVELOPERS: add Shubham Chakraborty as maintainer of package/which Shubham Chakraborty
2026-03-09  9:14 ` Thomas Petazzoni via buildroot [this message]
2026-03-09 16:43   ` [Buildroot] [PATCH v2 1/2] package/which: fix getopt implicit prototype conflicting with system headers 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=aa6POBcIqxvNmWDw@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