20 lines
540 B
Diff
20 lines
540 B
Diff
Source: https://gitlab.alpinelinux.org/alpine/aports/-/blob/a292d641ca2d765507aac4fc2925bb651e2f84b2/main/mdadm/basename.patch
|
|
|
|
--- a/mdadm.h
|
|
+++ b/mdadm.h
|
|
@@ -248,6 +248,14 @@ static inline void __put_unaligned32(__u
|
|
}
|
|
|
|
/*
|
|
+ * Ensure GNU basename behavior for musl libc
|
|
+ */
|
|
+#ifndef __GLIBC__
|
|
+#define basename(path) \
|
|
+ (strrchr((path),'/') ? strrchr((path),'/')+1 : (path))
|
|
+#endif
|
|
+
|
|
+/*
|
|
* Check at compile time that something is of a particular type.
|
|
* Always evaluates to 1 so you may use it easily in comparisons.
|
|
*/
|