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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
From 1ee119c8026dff34a4d8c4269c05d3d4e0c25aa6 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 3 Aug 2019 11:03:40 +0200
Subject: [mdadm PATCH] Add missing include file sys/sysmacros.h
This include file is needed for makedev(), major() and minor() which are
used in these functions. In musl 1.1.23 sys/sysmacros.h is not included
indirectly any more and mdadm fails to compile.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
Assemble.c | 1 +
Build.c | 1 +
Create.c | 1 +
Detail.c | 1 +
Grow.c | 1 +
Incremental.c | 1 +
Manage.c | 1 +
Monitor.c | 1 +
Query.c | 1 +
lib.c | 1 +
mapfile.c | 1 +
mdadm.c | 1 +
mdopen.c | 1 +
platform-intel.c | 1 +
policy.c | 1 +
super-ddf.c | 1 +
super-intel.c | 1 +
sysfs.c | 1 +
util.c | 1 +
19 files changed, 19 insertions(+)
--- a/Assemble.c
+++ b/Assemble.c
@@ -24,6 +24,7 @@
#include "mdadm.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
static int name_matches(char *found, char *required, char *homehost, int require_homehost)
{
--- a/Build.c
+++ b/Build.c
@@ -23,6 +23,7 @@
*/
#include "mdadm.h"
+#include <sys/sysmacros.h>
int Build(char *mddev, struct mddev_dev *devlist,
struct shape *s, struct context *c)
--- a/Create.c
+++ b/Create.c
@@ -26,6 +26,7 @@
#include "md_u.h"
#include "md_p.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
static int default_layout(struct supertype *st, int level, int verbose)
{
--- a/Detail.c
+++ b/Detail.c
@@ -27,6 +27,7 @@
#include "md_u.h"
#include <ctype.h>
#include <dirent.h>
+#include <sys/sysmacros.h>
static int cmpstringp(const void *p1, const void *p2)
{
--- a/Grow.c
+++ b/Grow.c
@@ -27,6 +27,7 @@
#include <stddef.h>
#include <stdint.h>
#include <signal.h>
+#include <sys/sysmacros.h>
#include <sys/wait.h>
#if ! defined(__BIG_ENDIAN) && ! defined(__LITTLE_ENDIAN)
--- a/Incremental.c
+++ b/Incremental.c
@@ -29,6 +29,7 @@
*/
#include "mdadm.h"
+#include <sys/sysmacros.h>
#include <sys/wait.h>
#include <dirent.h>
#include <ctype.h>
--- a/Manage.c
+++ b/Manage.c
@@ -26,6 +26,7 @@
#include "md_u.h"
#include "md_p.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
int Manage_ro(char *devname, int fd, int readonly)
{
--- a/Monitor.c
+++ b/Monitor.c
@@ -25,6 +25,7 @@
#include "mdadm.h"
#include "md_p.h"
#include "md_u.h"
+#include <sys/sysmacros.h>
#include <sys/wait.h>
#include <signal.h>
#include <limits.h>
--- a/Query.c
+++ b/Query.c
@@ -25,6 +25,7 @@
#include "mdadm.h"
#include "md_p.h"
#include "md_u.h"
+#include <sys/sysmacros.h>
int Query(char *dev)
{
--- a/lib.c
+++ b/lib.c
@@ -25,6 +25,7 @@
#include "mdadm.h"
#include "dlink.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
/* This fill contains various 'library' style function. They
* have no dependency on anything outside this file.
--- a/mapfile.c
+++ b/mapfile.c
@@ -44,6 +44,7 @@
*/
#include "mdadm.h"
#include <sys/file.h>
+#include <sys/sysmacros.h>
#include <ctype.h>
#define MAP_READ 0
--- a/mdadm.c
+++ b/mdadm.c
@@ -28,6 +28,7 @@
#include "mdadm.h"
#include "md_p.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
static int scan_assemble(struct supertype *ss,
struct context *c,
--- a/mdopen.c
+++ b/mdopen.c
@@ -25,6 +25,7 @@
#include "mdadm.h"
#include "md_p.h"
#include <ctype.h>
+#include <sys/sysmacros.h>
void make_parts(char *dev, int cnt)
{
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -28,6 +28,7 @@
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <limits.h>
static int devpath_to_ll(const char *dev_path, const char *entry,
--- a/policy.c
+++ b/policy.c
@@ -26,6 +26,7 @@
#include <dirent.h>
#include <fnmatch.h>
#include <ctype.h>
+#include <sys/sysmacros.h>
#include "dlink.h"
/*
* Policy module for mdadm.
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -31,6 +31,7 @@
#include "sha1.h"
#include <values.h>
#include <stddef.h>
+#include <sys/sysmacros.h>
/* a non-official T10 name for creation GUIDs */
static char T10[] = "Linux-MD";
--- a/super-intel.c
+++ b/super-intel.c
@@ -24,6 +24,7 @@
#include "platform-intel.h"
#include <values.h>
#include <scsi/sg.h>
+#include <sys/sysmacros.h>
#include <ctype.h>
#include <dirent.h>
--- a/sysfs.c
+++ b/sysfs.c
@@ -26,6 +26,7 @@
#include "mdadm.h"
#include <dirent.h>
#include <ctype.h>
+#include <sys/sysmacros.h>
#define MAX_SYSFS_PATH_LEN 120
--- a/util.c
+++ b/util.c
@@ -29,6 +29,7 @@
#include <sys/wait.h>
#include <sys/un.h>
#include <sys/resource.h>
+#include <sys/sysmacros.h>
#include <sys/vfs.h>
#include <sys/mman.h>
#include <linux/magic.h>
|