public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/, sys-fs/mdadm/files/
Date: Thu, 13 Feb 2025 12:00:45 +0000 (UTC)	[thread overview]
Message-ID: <1739447910.2637faef70821b8cfa25cd5ca4d340fa3ddf70bd.sam@gentoo> (raw)

commit:     2637faef70821b8cfa25cd5ca4d340fa3ddf70bd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 13 11:58:30 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 11:58:30 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2637faef

sys-fs/mdadm: backport musl build fixes to 4.3-r1

Closes: https://bugs.gentoo.org/926289
Thanks-to: ernsteiswuerfel <erhard_f <AT> mailbox.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch | 19 +++++++++++++++++++
 sys-fs/mdadm/files/mdadm-4.3-musl-include.patch  | 14 ++++++++++++++
 sys-fs/mdadm/mdadm-4.3-r1.ebuild                 |  2 ++
 3 files changed, 35 insertions(+)

diff --git a/sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch b/sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch
new file mode 100644
index 000000000000..b8d0c3a7ca5c
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.3-musl-basename.patch
@@ -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;

diff --git a/sys-fs/mdadm/files/mdadm-4.3-musl-include.patch b/sys-fs/mdadm/files/mdadm-4.3-musl-include.patch
new file mode 100644
index 000000000000..da9efc9a0171
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-4.3-musl-include.patch
@@ -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
+

diff --git a/sys-fs/mdadm/mdadm-4.3-r1.ebuild b/sys-fs/mdadm/mdadm-4.3-r1.ebuild
index a7b58ea2ef44..140f5323f71f 100644
--- a/sys-fs/mdadm/mdadm-4.3-r1.ebuild
+++ b/sys-fs/mdadm/mdadm-4.3-r1.ebuild
@@ -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"


             reply	other threads:[~2025-02-13 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 12:00 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-13 11:34 [gentoo-commits] repo/gentoo:master commit in: sys-fs/mdadm/, sys-fs/mdadm/files/ Sam James
2024-03-30 19:48 Mike Gilbert
2022-01-03  7:41 Sam James
2016-04-19 22:12 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1739447910.2637faef70821b8cfa25cd5ca4d340fa3ddf70bd.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox