aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
blob: e58e5a96b086a54e52df6b815f0fac3b9a2b13c9 (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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
From 4ba19d64e95a874995d0b554b891b5ec35bd9495 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 7 Jan 2016 19:45:35 +0000
Subject: [PATCH 09/32] Guard error.h with __GLIBC__

error API is specific to glibc so use the guard to make it conditional
on glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/faccessat/faccessat01.c   | 2 ++
 testcases/kernel/syscalls/fallocate/fallocate01.c   | 2 ++
 testcases/kernel/syscalls/fchmodat/fchmodat01.c     | 2 ++
 testcases/kernel/syscalls/fchownat/fchownat01.c     | 2 ++
 testcases/kernel/syscalls/fchownat/fchownat02.c     | 2 ++
 testcases/kernel/syscalls/fstatat/fstatat01.c       | 2 ++
 testcases/kernel/syscalls/futimesat/futimesat01.c   | 2 ++
 testcases/kernel/syscalls/linkat/linkat01.c         | 2 ++
 testcases/kernel/syscalls/linkat/linkat02.c         | 2 ++
 testcases/kernel/syscalls/mkdirat/mkdirat01.c       | 2 ++
 testcases/kernel/syscalls/mknodat/mknodat01.c       | 2 ++
 testcases/kernel/syscalls/mknodat/mknodat02.c       | 2 ++
 testcases/kernel/syscalls/openat/openat01.c         | 2 ++
 testcases/kernel/syscalls/readlinkat/readlinkat01.c | 2 ++
 testcases/kernel/syscalls/renameat/renameat01.c     | 2 ++
 testcases/kernel/syscalls/symlinkat/symlinkat01.c   | 2 ++
 testcases/kernel/syscalls/unlinkat/unlinkat01.c     | 2 ++
 17 files changed, 34 insertions(+)

diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
index 7f0e87a..c72dcf0 100644
--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
@@ -37,7 +37,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
index e72b123..643c0e2 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
@@ -96,7 +96,9 @@
 #include <fcntl.h>
 #include <sys/syscall.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <inttypes.h>
 #include <sys/utsname.h>
 
diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
index 19e9ad5..ae6d807 100644
--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
@@ -37,7 +37,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
index b361253..a5218af 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
@@ -28,7 +28,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
index 6b0304c..8d2863f 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat02.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
@@ -26,7 +26,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
index 61531c6..e99fbd2 100644
--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
@@ -48,7 +48,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
index ae8d4fe..316dd78 100644
--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
@@ -37,7 +37,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
index fc0687b..83cbfe7 100644
--- a/testcases/kernel/syscalls/linkat/linkat01.c
+++ b/testcases/kernel/syscalls/linkat/linkat01.c
@@ -49,7 +49,9 @@
 #include <sys/time.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
index e9a752a..8d7e431 100644
--- a/testcases/kernel/syscalls/linkat/linkat02.c
+++ b/testcases/kernel/syscalls/linkat/linkat02.c
@@ -23,7 +23,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
index 7e15947..1dbc038 100644
--- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
@@ -30,7 +30,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index 26e5538..f034f05 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -29,7 +29,9 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
index f6368fa..7d0f7c0 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
@@ -29,7 +29,9 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/stat.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
index 85f9a91..4ee0117 100644
--- a/testcases/kernel/syscalls/openat/openat01.c
+++ b/testcases/kernel/syscalls/openat/openat01.c
@@ -29,7 +29,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
index 97a49e8..b162853 100644
--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
@@ -29,7 +29,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index f4cd51b..105a05b 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -42,7 +42,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
index 5c238d8..cb7a7e8 100644
--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
@@ -37,7 +37,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
index 31fe4e7..26f6d9a 100644
--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
@@ -37,7 +37,9 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
+#ifdef __GLIBC__
 #include <error.h>
+#endif
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-- 
2.7.0