mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
sys-fs/mdadm: backport musl build fixes to 4.3-r1
Closes: https://bugs.gentoo.org/926289 Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
19
sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch
Normal file
19
sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
https://bugs.gentoo.org/926289#c6
|
||||
https://github.com/md-raid-utilities/mdadm/commit/9dbd11e091f84eb0bf9d717283774816c4c4453d
|
||||
--- a/mdadm.h
|
||||
+++ b/mdadm.h
|
||||
@@ -223,6 +223,14 @@ struct dlm_lksb {
|
||||
struct __una_u16 { __u16 x; } __attribute__ ((packed));
|
||||
struct __una_u32 { __u32 x; } __attribute__ ((packed));
|
||||
|
||||
+/*
|
||||
+ * Ensure GNU basename behavior on GLIBC less systems.
|
||||
+ */
|
||||
+#ifndef __GLIBC__
|
||||
+#define basename(path) \
|
||||
+ (strrchr((path), '/') ? strrchr((path),'/') + 1 : (path))
|
||||
+#endif
|
||||
+
|
||||
static inline __u16 __get_unaligned16(const void *p)
|
||||
{
|
||||
const struct __una_u16 *ptr = (const struct __una_u16 *)p;
|
||||
14
sys-fs/mdadm/files/mdadm-4.3-musl-include.patch
Normal file
14
sys-fs/mdadm/files/mdadm-4.3-musl-include.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
https://bugs.gentoo.org/926289#c7
|
||||
https://github.com/md-raid-utilities/mdadm/commit/8bda86099089b44129ef6206764f9de47a45f0db
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
-
|
||||
+#include <limits.h>
|
||||
|
||||
/*
|
||||
* following taken from linux/blkpg.h because they aren't
|
||||
|
||||
@@ -37,6 +37,8 @@ PATCHES=(
|
||||
"${FILESDIR}/${PN}"-4.3-no-udev.patch
|
||||
"${FILESDIR}/${PN}"-4.3-musl125-1.patch
|
||||
"${FILESDIR}/${PN}"-4.3-do-not-call-gcc-directly.patch # 931972
|
||||
"${FILESDIR}/${PN}"-4.3-musl-basename.patch
|
||||
"${FILESDIR}/${PN}"-4.3-musl-include.patch
|
||||
"${WORKDIR}/debian/patches/debian/0001-fix-manpages.patch"
|
||||
"${WORKDIR}/debian/patches/debian/0003-host-name-in-default-mailfrom.patch"
|
||||
"${WORKDIR}/debian/patches/debian/0004-exit-gracefully-when-md-device-not-found.patch"
|
||||
|
||||
Reference in New Issue
Block a user