diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch | 326 |
1 files changed, 307 insertions, 19 deletions
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index f20897b5f8..a2e25a97df 100644 --- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch | |||
@@ -9,21 +9,45 @@ Upstream-Status: Inappropriate [musl specific] | |||
9 | 9 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
12 | [Rebased for v242] | ||
13 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
12 | --- | 14 | --- |
13 | meson.build | 1 + | 15 | meson.build | 1 + |
14 | src/basic/missing_stdlib.h | 12 ++++++++++++ | 16 | src/backlight/backlight.c | 1 + |
15 | src/basic/mkdir.c | 1 + | 17 | src/basic/env-util.c | 1 + |
16 | src/basic/parse-util.c | 1 + | 18 | src/basic/missing_stdlib.h | 12 ++++++++++++ |
17 | src/basic/procfs-util.c | 1 + | 19 | src/basic/mkdir.c | 1 + |
18 | src/shared/pager.c | 1 + | 20 | src/basic/parse-util.c | 1 + |
19 | src/shared/uid-range.c | 1 + | 21 | src/basic/proc-cmdline.c | 1 + |
20 | 7 files changed, 18 insertions(+) | 22 | src/basic/procfs-util.c | 1 + |
23 | src/basic/time-util.c | 1 + | ||
24 | src/core/dbus-cgroup.c | 1 + | ||
25 | src/core/dbus-util.c | 1 + | ||
26 | src/core/kmod-setup.c | 1 + | ||
27 | src/core/service.c | 1 + | ||
28 | src/journal/journalctl.c | 1 + | ||
29 | src/libsystemd/sd-bus/bus-message.c | 1 + | ||
30 | src/libsystemd/sd-bus/bus-objects.c | 1 + | ||
31 | src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + | ||
32 | src/locale/keymap-util.c | 1 + | ||
33 | src/nspawn/nspawn-settings.c | 1 + | ||
34 | src/shared/dns-domain.c | 1 + | ||
35 | src/shared/journal-importer.c | 1 + | ||
36 | src/shared/logs-show.c | 1 + | ||
37 | src/shared/pager.c | 1 + | ||
38 | src/shared/path-lookup.c | 1 + | ||
39 | src/shared/uid-range.c | 1 + | ||
40 | src/socket-proxy/socket-proxyd.c | 1 + | ||
41 | src/test/test-hexdecoct.c | 1 + | ||
42 | src/udev/udev-builtin-path_id.c | 1 + | ||
43 | src/udev/udev-rules.c | 1 + | ||
44 | 29 files changed, 40 insertions(+) | ||
21 | 45 | ||
22 | diff --git a/meson.build b/meson.build | 46 | diff --git a/meson.build b/meson.build |
23 | index 44b24ee..70fb218 100644 | 47 | index 79195c9..80d9564 100644 |
24 | --- a/meson.build | 48 | --- a/meson.build |
25 | +++ b/meson.build | 49 | +++ b/meson.build |
26 | @@ -558,6 +558,7 @@ foreach ident : [ | 50 | @@ -572,6 +572,7 @@ foreach ident : [ |
27 | #include <unistd.h>'''], | 51 | #include <unistd.h>'''], |
28 | ['explicit_bzero' , '''#include <string.h>'''], | 52 | ['explicit_bzero' , '''#include <string.h>'''], |
29 | ['reallocarray', '''#include <malloc.h>'''], | 53 | ['reallocarray', '''#include <malloc.h>'''], |
@@ -31,8 +55,32 @@ index 44b24ee..70fb218 100644 | |||
31 | ] | 55 | ] |
32 | 56 | ||
33 | have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') | 57 | have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') |
58 | diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c | ||
59 | index dfd6805..c2b2ace 100644 | ||
60 | --- a/src/backlight/backlight.c | ||
61 | +++ b/src/backlight/backlight.c | ||
62 | @@ -17,6 +17,7 @@ | ||
63 | #include "string-util.h" | ||
64 | #include "strv.h" | ||
65 | #include "util.h" | ||
66 | +#include "missing.h" | ||
67 | |||
68 | static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { | ||
69 | const char *subsystem, *sysname, *value; | ||
70 | diff --git a/src/basic/env-util.c b/src/basic/env-util.c | ||
71 | index fd449dc..e2b0722 100644 | ||
72 | --- a/src/basic/env-util.c | ||
73 | +++ b/src/basic/env-util.c | ||
74 | @@ -16,6 +16,7 @@ | ||
75 | #include "string-util.h" | ||
76 | #include "strv.h" | ||
77 | #include "utf8.h" | ||
78 | +#include "missing.h" | ||
79 | |||
80 | #define VALID_CHARS_ENV_NAME \ | ||
81 | DIGITS LETTERS \ | ||
34 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h | 82 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h |
35 | index c0ffe86..d50274b 100644 | 83 | index 188a8d4..1e16ec2 100644 |
36 | --- a/src/basic/missing_stdlib.h | 84 | --- a/src/basic/missing_stdlib.h |
37 | +++ b/src/basic/missing_stdlib.h | 85 | +++ b/src/basic/missing_stdlib.h |
38 | @@ -11,3 +11,15 @@ | 86 | @@ -11,3 +11,15 @@ |
@@ -52,10 +100,10 @@ index c0ffe86..d50274b 100644 | |||
52 | + }) | 100 | + }) |
53 | +#endif | 101 | +#endif |
54 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c | 102 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c |
55 | index 4bb65d5..3038ab9 100644 | 103 | index 6b82eab..51c6b78 100644 |
56 | --- a/src/basic/mkdir.c | 104 | --- a/src/basic/mkdir.c |
57 | +++ b/src/basic/mkdir.c | 105 | +++ b/src/basic/mkdir.c |
58 | @@ -13,6 +13,7 @@ | 106 | @@ -14,6 +14,7 @@ |
59 | #include "stat-util.h" | 107 | #include "stat-util.h" |
60 | #include "stdio-util.h" | 108 | #include "stdio-util.h" |
61 | #include "user-util.h" | 109 | #include "user-util.h" |
@@ -75,6 +123,18 @@ index 87724af..d9c53bc 100644 | |||
75 | 123 | ||
76 | int parse_boolean(const char *v) { | 124 | int parse_boolean(const char *v) { |
77 | if (!v) | 125 | if (!v) |
126 | diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c | ||
127 | index 1670001..b51feaa 100644 | ||
128 | --- a/src/basic/proc-cmdline.c | ||
129 | +++ b/src/basic/proc-cmdline.c | ||
130 | @@ -15,6 +15,7 @@ | ||
131 | #include "string-util.h" | ||
132 | #include "util.h" | ||
133 | #include "virt.h" | ||
134 | +#include "missing.h" | ||
135 | |||
136 | int proc_cmdline(char **ret) { | ||
137 | const char *e; | ||
78 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | 138 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c |
79 | index 7aaf95b..42ce53d 100644 | 139 | index 7aaf95b..42ce53d 100644 |
80 | --- a/src/basic/procfs-util.c | 140 | --- a/src/basic/procfs-util.c |
@@ -87,30 +147,258 @@ index 7aaf95b..42ce53d 100644 | |||
87 | 147 | ||
88 | int procfs_tasks_get_limit(uint64_t *ret) { | 148 | int procfs_tasks_get_limit(uint64_t *ret) { |
89 | _cleanup_free_ char *value = NULL; | 149 | _cleanup_free_ char *value = NULL; |
150 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
151 | index daf952b..374b97f 100644 | ||
152 | --- a/src/basic/time-util.c | ||
153 | +++ b/src/basic/time-util.c | ||
154 | @@ -28,6 +28,7 @@ | ||
155 | #include "string-util.h" | ||
156 | #include "strv.h" | ||
157 | #include "time-util.h" | ||
158 | +#include "missing.h" | ||
159 | |||
160 | static clockid_t map_clock_id(clockid_t c) { | ||
161 | |||
162 | diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c | ||
163 | index 4615aea..bc1364f 100644 | ||
164 | --- a/src/core/dbus-cgroup.c | ||
165 | +++ b/src/core/dbus-cgroup.c | ||
166 | @@ -15,6 +15,7 @@ | ||
167 | #include "fileio.h" | ||
168 | #include "limits-util.h" | ||
169 | #include "path-util.h" | ||
170 | +#include "missing.h" | ||
171 | |||
172 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); | ||
173 | |||
174 | diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c | ||
175 | index f4fbb72..0a1e3b5 100644 | ||
176 | --- a/src/core/dbus-util.c | ||
177 | +++ b/src/core/dbus-util.c | ||
178 | @@ -7,6 +7,7 @@ | ||
179 | #include "unit-printf.h" | ||
180 | #include "user-util.h" | ||
181 | #include "unit.h" | ||
182 | +#include "missing.h" | ||
183 | |||
184 | int bus_property_get_triggered_unit( | ||
185 | sd_bus *bus, | ||
186 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c | ||
187 | index a91cfeb..a459610 100644 | ||
188 | --- a/src/core/kmod-setup.c | ||
189 | +++ b/src/core/kmod-setup.c | ||
190 | @@ -11,6 +11,7 @@ | ||
191 | #include "kmod-setup.h" | ||
192 | #include "macro.h" | ||
193 | #include "string-util.h" | ||
194 | +#include "missing.h" | ||
195 | |||
196 | #if HAVE_KMOD | ||
197 | #include <libkmod.h> | ||
198 | diff --git a/src/core/service.c b/src/core/service.c | ||
199 | index 0289990..0e725b5 100644 | ||
200 | --- a/src/core/service.c | ||
201 | +++ b/src/core/service.c | ||
202 | @@ -42,6 +42,7 @@ | ||
203 | #include "unit.h" | ||
204 | #include "utf8.h" | ||
205 | #include "util.h" | ||
206 | +#include "missing.h" | ||
207 | |||
208 | static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { | ||
209 | [SERVICE_DEAD] = UNIT_INACTIVE, | ||
210 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c | ||
211 | index 0048909..0e85eb7 100644 | ||
212 | --- a/src/journal/journalctl.c | ||
213 | +++ b/src/journal/journalctl.c | ||
214 | @@ -67,6 +67,7 @@ | ||
215 | #include "tmpfile-util.h" | ||
216 | #include "unit-name.h" | ||
217 | #include "user-util.h" | ||
218 | +#include "missing.h" | ||
219 | |||
220 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) | ||
221 | |||
222 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c | ||
223 | index 427d42f..b050568 100644 | ||
224 | --- a/src/libsystemd/sd-bus/bus-message.c | ||
225 | +++ b/src/libsystemd/sd-bus/bus-message.c | ||
226 | @@ -21,6 +21,7 @@ | ||
227 | #include "strv.h" | ||
228 | #include "time-util.h" | ||
229 | #include "utf8.h" | ||
230 | +#include "missing.h" | ||
231 | |||
232 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); | ||
233 | |||
234 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c | ||
235 | index d9fc256..e9c6932 100644 | ||
236 | --- a/src/libsystemd/sd-bus/bus-objects.c | ||
237 | +++ b/src/libsystemd/sd-bus/bus-objects.c | ||
238 | @@ -13,6 +13,7 @@ | ||
239 | #include "set.h" | ||
240 | #include "string-util.h" | ||
241 | #include "strv.h" | ||
242 | +#include "missing.h" | ||
243 | |||
244 | static int node_vtable_get_userdata( | ||
245 | sd_bus *bus, | ||
246 | diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
247 | index 8de0a85..4fd0a2e 100644 | ||
248 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
249 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
250 | @@ -14,6 +14,7 @@ | ||
251 | #include "missing_resource.h" | ||
252 | #include "time-util.h" | ||
253 | #include "util.h" | ||
254 | +#include "missing.h" | ||
255 | |||
256 | #define MAX_SIZE (2*1024*1024) | ||
257 | |||
258 | diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c | ||
259 | index b8bd181..fe0cae0 100644 | ||
260 | --- a/src/locale/keymap-util.c | ||
261 | +++ b/src/locale/keymap-util.c | ||
262 | @@ -23,6 +23,7 @@ | ||
263 | #include "string-util.h" | ||
264 | #include "strv.h" | ||
265 | #include "tmpfile-util.h" | ||
266 | +#include "missing.h" | ||
267 | |||
268 | static bool startswith_comma(const char *s, const char *prefix) { | ||
269 | s = startswith(s, prefix); | ||
270 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c | ||
271 | index 476cb07..91e28de 100644 | ||
272 | --- a/src/nspawn/nspawn-settings.c | ||
273 | +++ b/src/nspawn/nspawn-settings.c | ||
274 | @@ -16,6 +16,7 @@ | ||
275 | #include "strv.h" | ||
276 | #include "user-util.h" | ||
277 | #include "util.h" | ||
278 | +#include "missing.h" | ||
279 | |||
280 | Settings *settings_new(void) { | ||
281 | Settings *s; | ||
282 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c | ||
283 | index 4b31cb3..989ebf3 100644 | ||
284 | --- a/src/shared/dns-domain.c | ||
285 | +++ b/src/shared/dns-domain.c | ||
286 | @@ -24,6 +24,7 @@ | ||
287 | #include "string-util.h" | ||
288 | #include "strv.h" | ||
289 | #include "utf8.h" | ||
290 | +#include "missing.h" | ||
291 | |||
292 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { | ||
293 | const char *n; | ||
294 | diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c | ||
295 | index 8638cd3..d03774a 100644 | ||
296 | --- a/src/shared/journal-importer.c | ||
297 | +++ b/src/shared/journal-importer.c | ||
298 | @@ -13,6 +13,7 @@ | ||
299 | #include "parse-util.h" | ||
300 | #include "string-util.h" | ||
301 | #include "unaligned.h" | ||
302 | +#include "missing.h" | ||
303 | |||
304 | enum { | ||
305 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ | ||
306 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c | ||
307 | index 5fb736f..19cb165 100644 | ||
308 | --- a/src/shared/logs-show.c | ||
309 | +++ b/src/shared/logs-show.c | ||
310 | @@ -38,6 +38,7 @@ | ||
311 | #include "time-util.h" | ||
312 | #include "utf8.h" | ||
313 | #include "util.h" | ||
314 | +#include "missing.h" | ||
315 | |||
316 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ | ||
317 | #define PRINT_LINE_THRESHOLD 3 | ||
90 | diff --git a/src/shared/pager.c b/src/shared/pager.c | 318 | diff --git a/src/shared/pager.c b/src/shared/pager.c |
91 | index bf2597e..fa9e321 100644 | 319 | index 2abb0f6..a00c95f 100644 |
92 | --- a/src/shared/pager.c | 320 | --- a/src/shared/pager.c |
93 | +++ b/src/shared/pager.c | 321 | +++ b/src/shared/pager.c |
94 | @@ -24,6 +24,7 @@ | 322 | @@ -25,6 +25,7 @@ |
95 | #include "string-util.h" | ||
96 | #include "strv.h" | 323 | #include "strv.h" |
97 | #include "terminal-util.h" | 324 | #include "terminal-util.h" |
325 | #include "util.h" | ||
98 | +#include "missing.h" | 326 | +#include "missing.h" |
99 | 327 | ||
100 | static pid_t pager_pid = 0; | 328 | static pid_t pager_pid = 0; |
101 | 329 | ||
330 | diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c | ||
331 | index 442fde7..0eb1188 100644 | ||
332 | --- a/src/shared/path-lookup.c | ||
333 | +++ b/src/shared/path-lookup.c | ||
334 | @@ -20,6 +20,7 @@ | ||
335 | #include "tmpfile-util.h" | ||
336 | #include "user-util.h" | ||
337 | #include "util.h" | ||
338 | +#include "missing.h" | ||
339 | |||
340 | int xdg_user_runtime_dir(char **ret, const char *suffix) { | ||
341 | const char *e; | ||
102 | diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c | 342 | diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c |
103 | index 5fa7bd2..9c63b9e 100644 | 343 | index 7cb7d8a..8b12b91 100644 |
104 | --- a/src/shared/uid-range.c | 344 | --- a/src/shared/uid-range.c |
105 | +++ b/src/shared/uid-range.c | 345 | +++ b/src/shared/uid-range.c |
106 | @@ -9,6 +9,7 @@ | 346 | @@ -9,6 +9,7 @@ |
347 | #include "sort-util.h" | ||
107 | #include "uid-range.h" | 348 | #include "uid-range.h" |
108 | #include "user-util.h" | 349 | #include "user-util.h" |
109 | #include "util.h" | ||
110 | +#include "missing.h" | 350 | +#include "missing.h" |
111 | 351 | ||
112 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { | 352 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { |
113 | assert(range); | 353 | assert(range); |
354 | diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c | ||
355 | index abbbc9f..6179b58 100644 | ||
356 | --- a/src/socket-proxy/socket-proxyd.c | ||
357 | +++ b/src/socket-proxy/socket-proxyd.c | ||
358 | @@ -28,6 +28,7 @@ | ||
359 | #include "socket-util.h" | ||
360 | #include "string-util.h" | ||
361 | #include "util.h" | ||
362 | +#include "missing.h" | ||
363 | |||
364 | #define BUFFER_SIZE (256 * 1024) | ||
365 | |||
366 | diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c | ||
367 | index 5221742..a05e778 100644 | ||
368 | --- a/src/test/test-hexdecoct.c | ||
369 | +++ b/src/test/test-hexdecoct.c | ||
370 | @@ -6,6 +6,7 @@ | ||
371 | #include "hexdecoct.h" | ||
372 | #include "macro.h" | ||
373 | #include "string-util.h" | ||
374 | +#include "missing.h" | ||
375 | |||
376 | static void test_hexchar(void) { | ||
377 | assert_se(hexchar(0xa) == 'a'); | ||
378 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c | ||
379 | index 7ce1c56..cc19b8e 100644 | ||
380 | --- a/src/udev/udev-builtin-path_id.c | ||
381 | +++ b/src/udev/udev-builtin-path_id.c | ||
382 | @@ -23,6 +23,7 @@ | ||
383 | #include "strv.h" | ||
384 | #include "sysexits.h" | ||
385 | #include "udev-builtin.h" | ||
386 | +#include "missing.h" | ||
387 | |||
388 | _printf_(2,3) | ||
389 | static void path_prepend(char **path, const char *fmt, ...) { | ||
390 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
391 | index ee87d7c..9aced10 100644 | ||
392 | --- a/src/udev/udev-rules.c | ||
393 | +++ b/src/udev/udev-rules.c | ||
394 | @@ -40,6 +40,7 @@ | ||
395 | #include "udev.h" | ||
396 | #include "user-util.h" | ||
397 | #include "util.h" | ||
398 | +#include "missing.h" | ||
399 | |||
400 | #define PREALLOC_TOKEN 2048 | ||
401 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") | ||
114 | -- | 402 | -- |
115 | 2.7.4 | 403 | 2.11.0 |
116 | 404 | ||