aboutsummaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
blob: 68ec2b8fdbec973bf8f75b4ea8ba7e0e789d9af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 9f7740c4c2fda64029c23674e9858ce8bd4367df Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Jul 2017 17:14:05 -0700
Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc

For musl libc it is required to include <sys/reg.h> to
have __WORDSIZE defined to e.g. 32 for arm*-musl.

Taken from void-linux
https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 src/install/util.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/install/util.h b/src/install/util.h
index a6f9a184..82732913 100644
--- a/src/install/util.h
+++ b/src/install/util.h
@@ -36,6 +36,9 @@
 #include <sys/stat.h>
 #include <dirent.h>
 #include <sys/resource.h>
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
 
 #include "macro.h"
 
-- 
2.17.1