Include libgen.h to fix musl builds#272
Merged
Merged
Conversation
Collaborator
|
Hi, thansk for your fix. It looks like this fix breaks basic compatibility; I’ve already seen a solution for a similar issue that is safer. |
bkuhls
added a commit
to bkuhls/ledmon
that referenced
this pull request
Dec 1, 2025
If GNU basename is not avilable, define it. It is safer to use that rather than include libgen.h with XPG basename() definition. Suggested in md-raid-utilities#272 (comment) Code copied from md-raid-utilities/mdadm@9dbd11e
Contributor
Author
Hi, thanks for the review. I force-pushed a new patch which fixes the problem reported by buildroot toolchains with musl and does not introduce build errors for uClibc and glibc. I hope that I used the correct header file. |
bkucman
requested changes
Dec 2, 2025
bkucman
left a comment
Collaborator
There was a problem hiding this comment.
Hi,
In my opinion, this is a right header for this define.
please fix style issues.
If GNU basename is not avilable, define it. It is safer to use that rather than include libgen.h with XPG basename() definition. Suggested in https://github.com/md-raid-utilities/ledmon/pull/ 272#issuecomment-3596495739 Code copied from md-raid-utilities/mdadm@9dbd11e Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
arnout
pushed a commit
to buildroot/buildroot
that referenced
this pull request
Dec 30, 2025
Updated patch following an upstream review: md-raid-utilities/ledmon#272 (comment) Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
arnout
pushed a commit
to buildroot/buildroot
that referenced
this pull request
Jan 13, 2026
Updated patch following an upstream review: md-raid-utilities/ledmon#272 (comment) Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit b4668ed) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
arnout
pushed a commit
to buildroot/buildroot
that referenced
this pull request
Jan 13, 2026
Updated patch following an upstream review: md-raid-utilities/ledmon#272 (comment) Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit b4668ed) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
mtkaczyk
approved these changes
Jan 14, 2026
bkucman
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes various build errors like
Recorded by the buildroot autobuilders:
https://autobuild.buildroot.net/results/942/942cb2dcd061b8620211b63d4be34dc414251b62/build-end.log
Alpine Linux contains a similar patch for ledmon v1.0.0:
https://gitlab.alpinelinux.org/p_q/aports/-/blob/master/testing/ledmon/gcc14-basename.patch