void-packages/srcpkgs/dracut/patches/musl-support.patch

35 lines
846 B
Diff

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)
{