1From 9f7740c4c2fda64029c23674e9858ce8bd4367df Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 13 Jul 2017 17:14:05 -0700
4Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
5
6For musl libc it is required to include <sys/reg.h> to
7have __WORDSIZE defined to e.g. 32 for arm*-musl.
8
9Taken from void-linux
10https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 src/install/util.h | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/src/install/util.h b/src/install/util.h
18index a6f9a184..82732913 100644
19--- a/src/install/util.h
20+++ b/src/install/util.h
21@@ -36,6 +36,9 @@
22 #include <sys/stat.h>
23 #include <dirent.h>
24 #include <sys/resource.h>
25+#if !defined(__GLIBC__)
26+#include <sys/reg.h>
27+#endif
28
29 #include "macro.h"
30
31--
322.17.1
33
34