mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-19 00:18:26 +00:00
Closes: https://bugs.gentoo.org/958314 Thanks-to: Samuel Blythe <metroidhunter9000@proton.me> Signed-off-by: Sam James <sam@gentoo.org>
20 lines
608 B
Diff
20 lines
608 B
Diff
https://bugs.gentoo.org/958314
|
|
|
|
Fixes compilation error against musl-libc, like in https://github.com/md-raid-utilities/mdadm/issues/12#issuecomment-2119880626
|
|
|
|
Patch by Samuel Blythe <metroidhunter9000@proton.me>
|
|
--- a/ifrename.c
|
|
+++ b/ifrename.c
|
|
@@ -52,6 +52,12 @@
|
|
|
|
#include "iwlib.h" /* Wireless Tools library */
|
|
|
|
+/* Ensure GNU basename behavior for musl libc */
|
|
+#ifndef __GLIBC__
|
|
+#define basename(path) \
|
|
+ (strrchr((path),'/') ? strrchr((path),'/')+1 : (path))
|
|
+#endif
|
|
+
|
|
// This would be cool, unfortunately...
|
|
//#include <linux/ethtool.h> /* Ethtool stuff -> struct ethtool_drvinfo */
|
|
|