From: Jiri Olsa <olsajiri@gmail.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
Quentin Monnet <quentin@isovalent.com>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
bpf@vger.kernel.org
Subject: Re: [PATCH] bpftool: Add missing libgen.h for basename()
Date: Fri, 5 Jan 2024 16:01:37 +0100 [thread overview]
Message-ID: <ZZgZ0cxEa7HvSUF6@krava> (raw)
In-Reply-To: <ZZfCX7tcM0RnuHJT@krava>
On Fri, Jan 05, 2024 at 09:48:31AM +0100, Jiri Olsa wrote:
> On Thu, Jan 04, 2024 at 10:01:35AM -0300, Arnaldo Carvalho de Melo wrote:
>
> SNIP
>
> > 9 51.66 amazonlinux:2 : Ok gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-17) , clang version 11.1.0 (Amazon Linux 2 11.1.0-1.amzn2.0.2) flex 2.5.37
> > 10 60.77 amazonlinux:2023 : Ok gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2) , clang version 15.0.7 (Amazon Linux 15.0.7-3.amzn2023.0.1) flex 2.6.4
> > 11 61.29 amazonlinux:devel : Ok gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4
> > 12 74.72 archlinux:base : Ok gcc (GCC) 13.2.1 20230801 , clang version 16.0.6 flex 2.6.4
> >
> > / $ grep -B8 -A2 -w basename /usr/include/string.h
> > #ifdef _GNU_SOURCE
> > #define strdupa(x) strcpy(alloca(strlen(x)+1),x)
> > int strverscmp (const char *, const char *);
> > char *strchrnul(const char *, int);
> > char *strcasestr(const char *, const char *);
> > void *memrchr(const void *, int, size_t);
> > void *mempcpy(void *, const void *, size_t);
> > #ifndef __cplusplus
> > char *basename();
> > #endif
> > #endif
> > / $ cat /etc/os-release
> > NAME="Alpine Linux"
> > ID=alpine
> > VERSION_ID=3.19.0
> > PRETTY_NAME="Alpine Linux v3.19"
> > HOME_URL="https://alpinelinux.org/"
> > BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
> > / $
> >
> > Weird, they had it and now removed the _GNU_SOURCE bits (edge is their
> > devel distro, like rawhide is for fedora, tumbleweed for opensuse, etc).
>
> let's see, I asked them in here: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15643
it got removed in musl libc recently:
https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
so perhaps switching to POSIX version of basename is the easiest way out?
jirka
next prev parent reply other threads:[~2024-01-05 15:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 3:04 [PATCH] bpftool: Add missing libgen.h for basename() Arnaldo Carvalho de Melo
2024-01-04 9:33 ` Jiri Olsa
2024-01-04 12:27 ` Arnaldo Carvalho de Melo
2024-01-04 13:01 ` Arnaldo Carvalho de Melo
2024-01-05 8:48 ` Jiri Olsa
2024-01-05 15:01 ` Jiri Olsa [this message]
2024-01-05 20:53 ` Arnaldo Carvalho de Melo
2024-01-06 20:02 ` Jiri Olsa
2024-01-26 15:53 ` Arnaldo Carvalho de Melo
2024-01-29 10:07 ` Quentin Monnet
2024-01-29 11:23 ` Jiri Olsa
2024-01-12 2:52 ` kernel test robot
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=ZZgZ0cxEa7HvSUF6@krava \
--to=olsajiri@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=namhyung@kernel.org \
--cc=quentin@isovalent.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