Bug 28783 - Include libgen.h in tools/abisym.cc to support non-glibc systems
Summary: Include libgen.h in tools/abisym.cc to support non-glibc systems
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-14 17:08 UTC by David Cantrell
Modified: 2022-01-17 13:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
0001-Include-libgen.h-in-tools-abisym.cc-for-basename-3.patch (463 bytes, application/mbox)
2022-01-14 17:08 UTC, David Cantrell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Cantrell 2022-01-14 17:08:10 UTC
Created attachment 13907 [details]
0001-Include-libgen.h-in-tools-abisym.cc-for-basename-3.patch

Ran in to this building and using libabigail on Alpine Linux, which is a musl-based distribution.

I included libgen.h to pick up the basename(3) definition.  Musl provides the POSIX basename(3) and not the GNU variant, but the usage in abisym.cc seems to be within the scope of the POSIX basename(3).
Comment 1 Dodji Seketeli 2022-01-17 13:34:05 UTC
Hello David,

dcantrell at redhat dot com via Libabigail <libabigail@sourceware.org> a
écrit:

[...]

> Created attachment 13907 [details]
>   --> https://sourceware.org/bugzilla/attachment.cgi?id=13907&action=edit
> 0001-Include-libgen.h-in-tools-abisym.cc-for-basename-3.patch

commit a37ee8f7da8d0b83ae4004269f71ea5b3c233e33
Author: David Cantrell <dcantrell@redhat.com>
Date:   Fri Jan 14 12:04:01 2022 -0500

    Include <libgen.h> in tools/abisym.cc for basename(3)
    
    Support building on non-glibc systems, such as musl, by including
    libgen.h for basename(3).
    
    Signed-off-by: David Cantrell <dcantrell@redhat.com>

Applied to master.

Thanks!

[...]

Cheers,
Comment 2 Dodji Seketeli 2022-01-17 13:34:20 UTC
patch applied to master.