netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Andreas K. Hüttel" <dilfridge@gentoo.org>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org,
	base-system@gentoo.org
Subject: Re: [PATCH] rdma.c: Add <libgen.h> include for basename on musl
Date: Mon, 5 Aug 2024 14:05:23 +0300	[thread overview]
Message-ID: <20240805110523.GC22826@unreal> (raw)
In-Reply-To: <20240804161054.942439-1-dilfridge@gentoo.org>

On Sun, Aug 04, 2024 at 06:10:20PM +0200, Andreas K. Hüttel wrote:
> This include file is required on musl for availability of basename.
> 
> Note that for glibc adding the include can have the side effect of
> switching from the GNU implementation of basename (which does not touch
> its argument) to the POSIX implementation (which under certain
> circumstances modifies the string passed to it, e.g. removing trailing
> slashes).
> 
> This is safe however since the C99 and C11 standard says:
> > The parameters argc and argv and the strings pointed to by the argv
> > array shall be modifiable by the program, and retain their last-stored
> > values between program startup and program termination.
> (multiple google results, unfortunately no official reference link)
> 
> Bug: https://bugs.gentoo.org/926341
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
> Only build-tested so far, but should be straightforward enough...
> ---
>  rdma/rdma.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2024-08-05 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 16:10 [PATCH] rdma.c: Add <libgen.h> include for basename on musl Andreas K. Hüttel
2024-08-05 11:05 ` Leon Romanovsky [this message]
2024-11-26 19:21 ` Alyssa Ross

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=20240805110523.GC22826@unreal \
    --to=leon@kernel.org \
    --cc=base-system@gentoo.org \
    --cc=dilfridge@gentoo.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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;
as well as URLs for NNTP newsgroup(s).