Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From 4ba19d64e95a874995d0b554b891b5ec35bd9495 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 7 Jan 2016 19:45:35 +0000 |
| 4 | Subject: [PATCH 09/32] Guard error.h with __GLIBC__ |
| 5 | |
| 6 | error API is specific to glibc so use the guard to make it conditional |
| 7 | on glibc |
| 8 | |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | testcases/kernel/syscalls/faccessat/faccessat01.c | 2 ++ |
| 12 | testcases/kernel/syscalls/fallocate/fallocate01.c | 2 ++ |
| 13 | testcases/kernel/syscalls/fchmodat/fchmodat01.c | 2 ++ |
| 14 | testcases/kernel/syscalls/fchownat/fchownat01.c | 2 ++ |
| 15 | testcases/kernel/syscalls/fchownat/fchownat02.c | 2 ++ |
| 16 | testcases/kernel/syscalls/fstatat/fstatat01.c | 2 ++ |
| 17 | testcases/kernel/syscalls/futimesat/futimesat01.c | 2 ++ |
| 18 | testcases/kernel/syscalls/linkat/linkat01.c | 2 ++ |
| 19 | testcases/kernel/syscalls/linkat/linkat02.c | 2 ++ |
| 20 | testcases/kernel/syscalls/mkdirat/mkdirat01.c | 2 ++ |
| 21 | testcases/kernel/syscalls/mknodat/mknodat01.c | 2 ++ |
| 22 | testcases/kernel/syscalls/mknodat/mknodat02.c | 2 ++ |
| 23 | testcases/kernel/syscalls/openat/openat01.c | 2 ++ |
| 24 | testcases/kernel/syscalls/readlinkat/readlinkat01.c | 2 ++ |
| 25 | testcases/kernel/syscalls/renameat/renameat01.c | 2 ++ |
| 26 | testcases/kernel/syscalls/symlinkat/symlinkat01.c | 2 ++ |
| 27 | testcases/kernel/syscalls/unlinkat/unlinkat01.c | 2 ++ |
| 28 | 17 files changed, 34 insertions(+) |
| 29 | |
| 30 | diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c |
| 31 | index 7f0e87a..c72dcf0 100644 |
| 32 | --- a/testcases/kernel/syscalls/faccessat/faccessat01.c |
| 33 | +++ b/testcases/kernel/syscalls/faccessat/faccessat01.c |
| 34 | @@ -37,7 +37,9 @@ |
| 35 | #include <sys/stat.h> |
| 36 | #include <fcntl.h> |
| 37 | #include <unistd.h> |
| 38 | +#ifdef __GLIBC__ |
| 39 | #include <error.h> |
| 40 | +#endif |
| 41 | #include <stdlib.h> |
| 42 | #include <errno.h> |
| 43 | #include <string.h> |
| 44 | diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c |
| 45 | index e72b123..643c0e2 100644 |
| 46 | --- a/testcases/kernel/syscalls/fallocate/fallocate01.c |
| 47 | +++ b/testcases/kernel/syscalls/fallocate/fallocate01.c |
| 48 | @@ -96,7 +96,9 @@ |
| 49 | #include <fcntl.h> |
| 50 | #include <sys/syscall.h> |
| 51 | #include <unistd.h> |
| 52 | +#ifdef __GLIBC__ |
| 53 | #include <error.h> |
| 54 | +#endif |
| 55 | #include <inttypes.h> |
| 56 | #include <sys/utsname.h> |
| 57 | |
| 58 | diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c |
| 59 | index 19e9ad5..ae6d807 100644 |
| 60 | --- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c |
| 61 | +++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c |
| 62 | @@ -37,7 +37,9 @@ |
| 63 | #include <sys/stat.h> |
| 64 | #include <fcntl.h> |
| 65 | #include <unistd.h> |
| 66 | +#ifdef __GLIBC__ |
| 67 | #include <error.h> |
| 68 | +#endif |
| 69 | #include <stdlib.h> |
| 70 | #include <errno.h> |
| 71 | #include <string.h> |
| 72 | diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c |
| 73 | index b361253..a5218af 100644 |
| 74 | --- a/testcases/kernel/syscalls/fchownat/fchownat01.c |
| 75 | +++ b/testcases/kernel/syscalls/fchownat/fchownat01.c |
| 76 | @@ -28,7 +28,9 @@ |
| 77 | #include <sys/stat.h> |
| 78 | #include <fcntl.h> |
| 79 | #include <unistd.h> |
| 80 | +#ifdef __GLIBC__ |
| 81 | #include <error.h> |
| 82 | +#endif |
| 83 | #include <stdlib.h> |
| 84 | #include <errno.h> |
| 85 | #include <string.h> |
| 86 | diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c |
| 87 | index 6b0304c..8d2863f 100644 |
| 88 | --- a/testcases/kernel/syscalls/fchownat/fchownat02.c |
| 89 | +++ b/testcases/kernel/syscalls/fchownat/fchownat02.c |
| 90 | @@ -26,7 +26,9 @@ |
| 91 | #include <sys/stat.h> |
| 92 | #include <fcntl.h> |
| 93 | #include <unistd.h> |
| 94 | +#ifdef __GLIBC__ |
| 95 | #include <error.h> |
| 96 | +#endif |
| 97 | #include <stdlib.h> |
| 98 | #include <errno.h> |
| 99 | #include <string.h> |
| 100 | diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c |
| 101 | index 61531c6..e99fbd2 100644 |
| 102 | --- a/testcases/kernel/syscalls/fstatat/fstatat01.c |
| 103 | +++ b/testcases/kernel/syscalls/fstatat/fstatat01.c |
| 104 | @@ -48,7 +48,9 @@ |
| 105 | #include <sys/stat.h> |
| 106 | #include <sys/time.h> |
| 107 | #include <fcntl.h> |
| 108 | +#ifdef __GLIBC__ |
| 109 | #include <error.h> |
| 110 | +#endif |
| 111 | #include <stdlib.h> |
| 112 | #include <errno.h> |
| 113 | #include <string.h> |
| 114 | diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c |
| 115 | index ae8d4fe..316dd78 100644 |
| 116 | --- a/testcases/kernel/syscalls/futimesat/futimesat01.c |
| 117 | +++ b/testcases/kernel/syscalls/futimesat/futimesat01.c |
| 118 | @@ -37,7 +37,9 @@ |
| 119 | #include <sys/stat.h> |
| 120 | #include <sys/time.h> |
| 121 | #include <fcntl.h> |
| 122 | +#ifdef __GLIBC__ |
| 123 | #include <error.h> |
| 124 | +#endif |
| 125 | #include <stdlib.h> |
| 126 | #include <errno.h> |
| 127 | #include <string.h> |
| 128 | diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c |
| 129 | index fc0687b..83cbfe7 100644 |
| 130 | --- a/testcases/kernel/syscalls/linkat/linkat01.c |
| 131 | +++ b/testcases/kernel/syscalls/linkat/linkat01.c |
| 132 | @@ -49,7 +49,9 @@ |
| 133 | #include <sys/time.h> |
| 134 | #include <fcntl.h> |
| 135 | #include <unistd.h> |
| 136 | +#ifdef __GLIBC__ |
| 137 | #include <error.h> |
| 138 | +#endif |
| 139 | #include <stdlib.h> |
| 140 | #include <errno.h> |
| 141 | #include <string.h> |
| 142 | diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c |
| 143 | index e9a752a..8d7e431 100644 |
| 144 | --- a/testcases/kernel/syscalls/linkat/linkat02.c |
| 145 | +++ b/testcases/kernel/syscalls/linkat/linkat02.c |
| 146 | @@ -23,7 +23,9 @@ |
| 147 | #include <sys/stat.h> |
| 148 | #include <fcntl.h> |
| 149 | #include <unistd.h> |
| 150 | +#ifdef __GLIBC__ |
| 151 | #include <error.h> |
| 152 | +#endif |
| 153 | #include <stdlib.h> |
| 154 | #include <errno.h> |
| 155 | #include <string.h> |
| 156 | diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c |
| 157 | index 7e15947..1dbc038 100644 |
| 158 | --- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c |
| 159 | +++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c |
| 160 | @@ -30,7 +30,9 @@ |
| 161 | #include <sys/types.h> |
| 162 | #include <sys/stat.h> |
| 163 | #include <fcntl.h> |
| 164 | +#ifdef __GLIBC__ |
| 165 | #include <error.h> |
| 166 | +#endif |
| 167 | #include <stdlib.h> |
| 168 | #include <errno.h> |
| 169 | #include <string.h> |
| 170 | diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c |
| 171 | index 26e5538..f034f05 100644 |
| 172 | --- a/testcases/kernel/syscalls/mknodat/mknodat01.c |
| 173 | +++ b/testcases/kernel/syscalls/mknodat/mknodat01.c |
| 174 | @@ -29,7 +29,9 @@ |
| 175 | #include <sys/types.h> |
| 176 | #include <fcntl.h> |
| 177 | #include <sys/stat.h> |
| 178 | +#ifdef __GLIBC__ |
| 179 | #include <error.h> |
| 180 | +#endif |
| 181 | #include <stdlib.h> |
| 182 | #include <errno.h> |
| 183 | #include <string.h> |
| 184 | diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c |
| 185 | index f6368fa..7d0f7c0 100644 |
| 186 | --- a/testcases/kernel/syscalls/mknodat/mknodat02.c |
| 187 | +++ b/testcases/kernel/syscalls/mknodat/mknodat02.c |
| 188 | @@ -29,7 +29,9 @@ |
| 189 | #include <sys/types.h> |
| 190 | #include <fcntl.h> |
| 191 | #include <sys/stat.h> |
| 192 | +#ifdef __GLIBC__ |
| 193 | #include <error.h> |
| 194 | +#endif |
| 195 | #include <stdlib.h> |
| 196 | #include <errno.h> |
| 197 | #include <string.h> |
| 198 | diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c |
| 199 | index 85f9a91..4ee0117 100644 |
| 200 | --- a/testcases/kernel/syscalls/openat/openat01.c |
| 201 | +++ b/testcases/kernel/syscalls/openat/openat01.c |
| 202 | @@ -29,7 +29,9 @@ |
| 203 | #include <sys/types.h> |
| 204 | #include <sys/stat.h> |
| 205 | #include <fcntl.h> |
| 206 | +#ifdef __GLIBC__ |
| 207 | #include <error.h> |
| 208 | +#endif |
| 209 | #include <stdlib.h> |
| 210 | #include <errno.h> |
| 211 | #include <string.h> |
| 212 | diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c |
| 213 | index 97a49e8..b162853 100644 |
| 214 | --- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c |
| 215 | +++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c |
| 216 | @@ -29,7 +29,9 @@ |
| 217 | #include <sys/stat.h> |
| 218 | #include <sys/time.h> |
| 219 | #include <fcntl.h> |
| 220 | +#ifdef __GLIBC__ |
| 221 | #include <error.h> |
| 222 | +#endif |
| 223 | #include <stdlib.h> |
| 224 | #include <errno.h> |
| 225 | #include <string.h> |
| 226 | diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c |
| 227 | index f4cd51b..105a05b 100644 |
| 228 | --- a/testcases/kernel/syscalls/renameat/renameat01.c |
| 229 | +++ b/testcases/kernel/syscalls/renameat/renameat01.c |
| 230 | @@ -42,7 +42,9 @@ |
| 231 | #include <sys/stat.h> |
| 232 | #include <sys/time.h> |
| 233 | #include <fcntl.h> |
| 234 | +#ifdef __GLIBC__ |
| 235 | #include <error.h> |
| 236 | +#endif |
| 237 | #include <stdlib.h> |
| 238 | #include <errno.h> |
| 239 | #include <string.h> |
| 240 | diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c |
| 241 | index 5c238d8..cb7a7e8 100644 |
| 242 | --- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c |
| 243 | +++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c |
| 244 | @@ -37,7 +37,9 @@ |
| 245 | #include <sys/stat.h> |
| 246 | #include <sys/time.h> |
| 247 | #include <fcntl.h> |
| 248 | +#ifdef __GLIBC__ |
| 249 | #include <error.h> |
| 250 | +#endif |
| 251 | #include <stdlib.h> |
| 252 | #include <errno.h> |
| 253 | #include <string.h> |
| 254 | diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c |
| 255 | index 31fe4e7..26f6d9a 100644 |
| 256 | --- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c |
| 257 | +++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c |
| 258 | @@ -37,7 +37,9 @@ |
| 259 | #include <sys/stat.h> |
| 260 | #include <sys/time.h> |
| 261 | #include <fcntl.h> |
| 262 | +#ifdef __GLIBC__ |
| 263 | #include <error.h> |
| 264 | +#endif |
| 265 | #include <stdlib.h> |
| 266 | #include <errno.h> |
| 267 | #include <string.h> |
| 268 | -- |
| 269 | 2.7.0 |
| 270 | |