Re: [PATCH v1] libbpf: Add namespace for errstr making it libbpf_errstr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 20, 2025 at 2:37 PM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
>
> On Thu, Mar 20, 2025 at 11:00 AM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> >
> > When statically linking symbols can be replaced with those from other
> > statically linked libraries depending on the link order and the hoped
> > for "multiple definition" error may not appear. To avoid conflicts it
> > is good practice to namespace symbols, this change renames errstr to
> > libbpf_errstr.
> >
> > Fixes: 1633a83bf993 ("libbpf: Introduce errstr() for stringifying errno")
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > ---
> > I feel like this patch shouldn't be strictly necessary, it turned out
> > for a use-case it was and people who know better than me say the
> > linker is working as intended. The conflicting errstr was from:
> > https://sourceforge.net/projects/linuxquota/
> > The fixes tag may not be strictly necessary.
> > ---
>
> sigh, I do like short errstr(). How about we avoid all this churn by
> naming the function libbpf_errstr() as you did, but then also
> defining:
>
> #define errstr(err) libbpf_errstr(err)
>
> and leaving all existing invocations as is
>
> ?

Works for me. I'll send a v2.

Thanks,
Ian





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux