aports/main/mdadm/basename.patch
omni a292d641ca main/mdadm: upgrade to 4.3
- align patches
- add basename.patch needed since musl 1.2.5, see #16106
- add Create.c-fix-build.patch from upstream, also musl 1.2.5
- add util.c-include-limits.h.patch from upstream, mainly for ppc64le
- add eudev-dev makedependency to satisfy libudev.h need
2024-05-20 08:19:56 +00:00

17 lines
412 B
Diff

--- 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.
*/