1 From 1ee119c8026dff34a4d8c4269c05d3d4e0c25aa6 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Sat, 3 Aug 2019 11:03:40 +0200
4 Subject: [mdadm PATCH] Add missing include file sys/sysmacros.h
6 This include file is needed for makedev(), major() and minor() which are
7 used in these functions. In musl 1.1.23 sys/sysmacros.h is not included
8 indirectly any more and mdadm fails to compile.
10 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
25 platform-intel.c | 1 +
31 19 files changed, 19 insertions(+)
39 +#include <sys/sysmacros.h>
41 static int name_matches(char *found, char *required, char *homehost, int require_homehost)
49 +#include <sys/sysmacros.h>
51 int Build(char *mddev, struct mddev_dev *devlist,
52 struct shape *s, struct context *c)
59 +#include <sys/sysmacros.h>
61 static int default_layout(struct supertype *st, int level, int verbose)
69 +#include <sys/sysmacros.h>
71 static int cmpstringp(const void *p1, const void *p2)
79 +#include <sys/sysmacros.h>
82 #if ! defined(__BIG_ENDIAN) && ! defined(__LITTLE_ENDIAN)
89 +#include <sys/sysmacros.h>
99 +#include <sys/sysmacros.h>
101 int Manage_ro(char *devname, int fd, int readonly)
109 +#include <sys/sysmacros.h>
110 #include <sys/wait.h>
119 +#include <sys/sysmacros.h>
129 +#include <sys/sysmacros.h>
131 /* This fill contains various 'library' style function. They
132 * have no dependency on anything outside this file.
138 #include <sys/file.h>
139 +#include <sys/sysmacros.h>
149 +#include <sys/sysmacros.h>
151 static int scan_assemble(struct supertype *ss,
159 +#include <sys/sysmacros.h>
161 void make_parts(char *dev, int cnt)
163 --- a/platform-intel.c
164 +++ b/platform-intel.c
166 #include <sys/mman.h>
167 #include <sys/types.h>
168 #include <sys/stat.h>
169 +#include <sys/sysmacros.h>
172 static int devpath_to_ll(const char *dev_path, const char *entry,
179 +#include <sys/sysmacros.h>
182 * Policy module for mdadm.
189 +#include <sys/sysmacros.h>
191 /* a non-official T10 name for creation GUIDs */
192 static char T10[] = "Linux-MD";
196 #include "platform-intel.h"
199 +#include <sys/sysmacros.h>
209 +#include <sys/sysmacros.h>
211 #define MAX_SYSFS_PATH_LEN 120
216 #include <sys/wait.h>
218 #include <sys/resource.h>
219 +#include <sys/sysmacros.h>
221 #include <sys/mman.h>
222 #include <linux/magic.h>