From: Denis Kenzior <denkenz@gmail.com>
To: Clayton Craft <clayton@craftyguy.net>, iwd@lists.linux.dev
Subject: Re: [PATCH] wiphy: include libgen.h to fix implicit def. with musl libc
Date: Tue, 13 Feb 2024 17:09:19 -0600 [thread overview]
Message-ID: <8b02ff06-9c2b-4503-8fb8-9784c2628394@gmail.com> (raw)
In-Reply-To: <20240212184747.30422-1-clayton@craftyguy.net>
Hi Clayton,
On 2/12/24 12:47, Clayton Craft wrote:
> This fixes a runtime segfault with musl libc and GCC13. musl dropped a
> basename prototype[1] in string.h, causing GCC to define it implicitly
> with the wrong function signature. The correct basename definition based
> on how wiphy uses it is in libgen.h.
Hmm, why did musl do that? man 3 basename indicates that the libgen.h version
implementation is free to scratch in the input argument, while the string.h one
doesn't.
In this particular case it doesn't matter since driver_path is never used again.
Still, the string.h version is much more intuitive.
Maybe this should be re-implemented in missing.h or ell (say l_file_basename or
l_dir_basename) instead?
>
> For context, see:
> https://gitlab.alpinelinux.org/alpine/aports/-/issues/15622
>
> 1. https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
> ---
> src/wiphy.c | 1 +
> 1 file changed, 1 insertion(+)
>
Regards,
-Denis
next prev parent reply other threads:[~2024-02-13 23:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 18:47 [PATCH] wiphy: include libgen.h to fix implicit def. with musl libc Clayton Craft
2024-02-13 23:09 ` Denis Kenzior [this message]
2024-02-14 0:13 ` Clayton Craft
2024-02-14 7:03 ` Marcel Holtmann
2024-02-14 16:26 ` Denis Kenzior
2024-02-14 16:30 ` Marcel Holtmann
2024-02-14 16:35 ` Denis Kenzior
2024-02-14 16:39 ` Marcel Holtmann
2024-02-14 16:46 ` Denis Kenzior
2024-02-14 16:52 ` Marcel Holtmann
2024-03-14 22:30 ` Clayton Craft
2024-03-15 13:49 ` Denis Kenzior
2024-03-15 22:09 ` Clayton Craft
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=8b02ff06-9c2b-4503-8fb8-9784c2628394@gmail.com \
--to=denkenz@gmail.com \
--cc=clayton@craftyguy.net \
--cc=iwd@lists.linux.dev \
/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