summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-05-28 21:39:03 -0400
committerMike Gilbert <floppym@gentoo.org>2022-05-28 21:39:48 -0400
commitcb3ba27d18d207d560ce25bbe0ef8cb714238002 (patch)
tree3a36f2fafae1856e7643fffb0561e6cdb8b8dbb3 /sys-kernel/dracut
parentgnome-base/gnome-vfs: Remove (diff)
downloadgentoo-cb3ba27d18d207d560ce25bbe0ef8cb714238002.tar.gz
gentoo-cb3ba27d18d207d560ce25bbe0ef8cb714238002.tar.bz2
gentoo-cb3ba27d18d207d560ce25bbe0ef8cb714238002.zip
sys-kernel/dracut: fix build on musl
Closes: https://bugs.gentoo.org/847919 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/dracut-056.ebuild1
-rw-r--r--sys-kernel/dracut/files/056-musl.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/sys-kernel/dracut/dracut-056.ebuild b/sys-kernel/dracut/dracut-056.ebuild
index 35a294f43e10..2b3d51d97aec 100644
--- a/sys-kernel/dracut/dracut-056.ebuild
+++ b/sys-kernel/dracut/dracut-056.ebuild
@@ -61,6 +61,7 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
PATCHES=(
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
+ "${FILESDIR}"/056-musl.patch
)
src_configure() {
diff --git a/sys-kernel/dracut/files/056-musl.patch b/sys-kernel/dracut/files/056-musl.patch
new file mode 100644
index 000000000000..ded188889755
--- /dev/null
+++ b/sys-kernel/dracut/files/056-musl.patch
@@ -0,0 +1,33 @@
+From ce55a85ed5d902c19d75895508856f96ec2ceb1a Mon Sep 17 00:00:00 2001
+From: Laszlo Gombos <laszlo.gombos@gmail.com>
+Date: Sun, 20 Feb 2022 22:23:49 -0500
+Subject: [PATCH] fix(install): restore musl support
+
+__GLIBC_PREREQ is only defined in glibc.
+---
+ src/install/util.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/install/util.c b/src/install/util.c
+index 5721de89e..0af387c27 100644
+--- a/src/install/util.c
++++ b/src/install/util.c
+@@ -24,17 +24,15 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/types.h>
++#include <sys/syscall.h>
+
+ #include "util.h"
+
+-#if __GLIBC_PREREQ(2, 30) == 0
+-#include <sys/syscall.h>
+ #ifndef SYS_gettid
+ #error "SYS_gettid unavailable on this system"
+ #endif
+
+ #define gettid() ((pid_t) syscall(SYS_gettid))
+-#endif /*__GLIBC_PREREQ */
+
+ size_t page_size(void)
+ {