summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-01-24 11:11:43 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-26 06:27:00 +0000
commite7ffa406dcaefd168b1641fee2f19ca3df850d53 (patch)
tree605ac6337bb21ef2d286627879eda3b082ceff00 /meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
parent603dffc49a2c0084ce73340fdf1d7c624d1a954e (diff)
downloadpoky-e7ffa406dcaefd168b1641fee2f19ca3df850d53.tar.gz
systemd: Forward port musl patches
Redo the header include patch and add fixes for new code. (From OE-Core rev: 7e35a575ef09a85e625a81e0b4d80b020e3e3a92) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.patch200
1 files changed, 54 insertions, 146 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 efdd43708b..36545c2f60 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
@@ -72,11 +72,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
72 src/udev/udev-rules.c | 1 + 72 src/udev/udev-rules.c | 1 +
73 51 files changed, 62 insertions(+) 73 51 files changed, 62 insertions(+)
74 74
75diff --git a/meson.build b/meson.build
76index 3421da3a4d..ddef6fba91 100644
77--- a/meson.build 75--- a/meson.build
78+++ b/meson.build 76+++ b/meson.build
79@@ -480,6 +480,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] 77@@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec
80 endforeach 78 endforeach
81 79
82 foreach ident : [ 80 foreach ident : [
@@ -84,8 +82,6 @@ index 3421da3a4d..ddef6fba91 100644
84 ['memfd_create', '''#include <sys/mman.h>'''], 82 ['memfd_create', '''#include <sys/mman.h>'''],
85 ['gettid', '''#include <sys/types.h> 83 ['gettid', '''#include <sys/types.h>
86 #include <unistd.h>'''], 84 #include <unistd.h>'''],
87diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
88index 7c0970a60c..c129ff0f4f 100644
89--- a/src/backlight/backlight.c 85--- a/src/backlight/backlight.c
90+++ b/src/backlight/backlight.c 86+++ b/src/backlight/backlight.c
91@@ -19,6 +19,7 @@ 87@@ -19,6 +19,7 @@
@@ -96,11 +92,9 @@ index 7c0970a60c..c129ff0f4f 100644
96 92
97 static int help(void) { 93 static int help(void) {
98 _cleanup_free_ char *link = NULL; 94 _cleanup_free_ char *link = NULL;
99diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
100index 1ff6160dc8..c9efd862a2 100644
101--- a/src/basic/cgroup-util.c 95--- a/src/basic/cgroup-util.c
102+++ b/src/basic/cgroup-util.c 96+++ b/src/basic/cgroup-util.c
103@@ -38,6 +38,7 @@ 97@@ -37,6 +37,7 @@
104 #include "unit-name.h" 98 #include "unit-name.h"
105 #include "user-util.h" 99 #include "user-util.h"
106 #include "xattr-util.h" 100 #include "xattr-util.h"
@@ -108,11 +102,9 @@ index 1ff6160dc8..c9efd862a2 100644
108 102
109 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { 103 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
110 _cleanup_free_ char *fs = NULL; 104 _cleanup_free_ char *fs = NULL;
111diff --git a/src/basic/env-util.c b/src/basic/env-util.c
112index 1ca445dab4..1f5a212d4e 100644
113--- a/src/basic/env-util.c 105--- a/src/basic/env-util.c
114+++ b/src/basic/env-util.c 106+++ b/src/basic/env-util.c
115@@ -18,6 +18,7 @@ 107@@ -19,6 +19,7 @@
116 #include "string-util.h" 108 #include "string-util.h"
117 #include "strv.h" 109 #include "strv.h"
118 #include "utf8.h" 110 #include "utf8.h"
@@ -120,8 +112,6 @@ index 1ca445dab4..1f5a212d4e 100644
120 112
121 /* We follow bash for the character set. Different shells have different rules. */ 113 /* We follow bash for the character set. Different shells have different rules. */
122 #define VALID_BASH_ENV_NAME_CHARS \ 114 #define VALID_BASH_ENV_NAME_CHARS \
123diff --git a/src/basic/log.c b/src/basic/log.c
124index fb183ea9e7..82e7bdff60 100644
125--- a/src/basic/log.c 115--- a/src/basic/log.c
126+++ b/src/basic/log.c 116+++ b/src/basic/log.c
127@@ -36,6 +36,7 @@ 117@@ -36,6 +36,7 @@
@@ -132,8 +122,6 @@ index fb183ea9e7..82e7bdff60 100644
132 122
133 #define SNDBUF_SIZE (8*1024*1024) 123 #define SNDBUF_SIZE (8*1024*1024)
134 124
135diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
136index 8c76f93eb2..9068bfb4f0 100644
137--- a/src/basic/missing_stdlib.h 125--- a/src/basic/missing_stdlib.h
138+++ b/src/basic/missing_stdlib.h 126+++ b/src/basic/missing_stdlib.h
139@@ -11,3 +11,15 @@ 127@@ -11,3 +11,15 @@
@@ -152,11 +140,9 @@ index 8c76f93eb2..9068bfb4f0 100644
152+ (char *)memcpy(__new, __old, __len); \ 140+ (char *)memcpy(__new, __old, __len); \
153+ }) 141+ })
154+#endif 142+#endif
155diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
156index f91f8f7a08..fb31596216 100644
157--- a/src/basic/mkdir.c 143--- a/src/basic/mkdir.c
158+++ b/src/basic/mkdir.c 144+++ b/src/basic/mkdir.c
159@@ -14,6 +14,7 @@ 145@@ -15,6 +15,7 @@
160 #include "stat-util.h" 146 #include "stat-util.h"
161 #include "stdio-util.h" 147 #include "stdio-util.h"
162 #include "user-util.h" 148 #include "user-util.h"
@@ -164,23 +150,19 @@ index f91f8f7a08..fb31596216 100644
164 150
165 int mkdir_safe_internal( 151 int mkdir_safe_internal(
166 const char *path, 152 const char *path,
167diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
168index 7e57d9a226..c0e64f2aca 100644
169--- a/src/basic/mountpoint-util.c 153--- a/src/basic/mountpoint-util.c
170+++ b/src/basic/mountpoint-util.c 154+++ b/src/basic/mountpoint-util.c
171@@ -11,6 +11,7 @@ 155@@ -13,6 +13,7 @@
172 #include "missing_stat.h" 156 #include "missing_stat.h"
173 #include "missing_syscall.h" 157 #include "missing_syscall.h"
174 #include "mkdir.h" 158 #include "mkdir.h"
175+#include "missing_stdlib.h" 159+#include "missing_stdlib.h"
176 #include "mountpoint-util.h" 160 #include "mountpoint-util.h"
161 #include "nulstr-util.h"
177 #include "parse-util.h" 162 #include "parse-util.h"
178 #include "path-util.h"
179diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
180index b79c885dfd..6dabda5691 100644
181--- a/src/basic/parse-util.c 163--- a/src/basic/parse-util.c
182+++ b/src/basic/parse-util.c 164+++ b/src/basic/parse-util.c
183@@ -19,6 +19,7 @@ 165@@ -18,6 +18,7 @@
184 #include "stat-util.h" 166 #include "stat-util.h"
185 #include "string-util.h" 167 #include "string-util.h"
186 #include "strv.h" 168 #include "strv.h"
@@ -188,11 +170,9 @@ index b79c885dfd..6dabda5691 100644
188 170
189 int parse_boolean(const char *v) { 171 int parse_boolean(const char *v) {
190 if (!v) 172 if (!v)
191diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
192index 05eb17d66c..b6026aab28 100644
193--- a/src/basic/path-lookup.c 173--- a/src/basic/path-lookup.c
194+++ b/src/basic/path-lookup.c 174+++ b/src/basic/path-lookup.c
195@@ -15,6 +15,7 @@ 175@@ -16,6 +16,7 @@
196 #include "strv.h" 176 #include "strv.h"
197 #include "tmpfile-util.h" 177 #include "tmpfile-util.h"
198 #include "user-util.h" 178 #include "user-util.h"
@@ -200,8 +180,6 @@ index 05eb17d66c..b6026aab28 100644
200 180
201 int xdg_user_runtime_dir(char **ret, const char *suffix) { 181 int xdg_user_runtime_dir(char **ret, const char *suffix) {
202 const char *e; 182 const char *e;
203diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c
204index 06f20fd61e..8159d721bb 100644
205--- a/src/basic/percent-util.c 183--- a/src/basic/percent-util.c
206+++ b/src/basic/percent-util.c 184+++ b/src/basic/percent-util.c
207@@ -3,6 +3,7 @@ 185@@ -3,6 +3,7 @@
@@ -212,8 +190,6 @@ index 06f20fd61e..8159d721bb 100644
212 190
213 static int parse_parts_value_whole(const char *p, const char *symbol) { 191 static int parse_parts_value_whole(const char *p, const char *symbol) {
214 const char *pc, *n; 192 const char *pc, *n;
215diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
216index 410b8a3eb5..f2c4355609 100644
217--- a/src/basic/proc-cmdline.c 193--- a/src/basic/proc-cmdline.c
218+++ b/src/basic/proc-cmdline.c 194+++ b/src/basic/proc-cmdline.c
219@@ -15,6 +15,7 @@ 195@@ -15,6 +15,7 @@
@@ -224,20 +200,16 @@ index 410b8a3eb5..f2c4355609 100644
224 200
225 int proc_cmdline(char **ret) { 201 int proc_cmdline(char **ret) {
226 const char *e; 202 const char *e;
227diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
228index 9234ccaf85..8c57094225 100644
229--- a/src/basic/procfs-util.c 203--- a/src/basic/procfs-util.c
230+++ b/src/basic/procfs-util.c 204+++ b/src/basic/procfs-util.c
231@@ -11,6 +11,7 @@ 205@@ -12,6 +12,7 @@
232 #include "procfs-util.h" 206 #include "procfs-util.h"
233 #include "stdio-util.h" 207 #include "stdio-util.h"
234 #include "string-util.h" 208 #include "string-util.h"
235+#include "missing_stdlib.h" 209+#include "missing_stdlib.h"
236 210
237 int procfs_tasks_get_limit(uint64_t *ret) { 211 int procfs_get_pid_max(uint64_t *ret) {
238 _cleanup_free_ char *value = NULL; 212 _cleanup_free_ char *value = NULL;
239diff --git a/src/basic/time-util.c b/src/basic/time-util.c
240index 5d162e8ffe..1cde8e4262 100644
241--- a/src/basic/time-util.c 213--- a/src/basic/time-util.c
242+++ b/src/basic/time-util.c 214+++ b/src/basic/time-util.c
243@@ -26,6 +26,7 @@ 215@@ -26,6 +26,7 @@
@@ -248,11 +220,9 @@ index 5d162e8ffe..1cde8e4262 100644
248 220
249 static clockid_t map_clock_id(clockid_t c) { 221 static clockid_t map_clock_id(clockid_t c) {
250 222
251diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
252index 3fc319ca27..90064c90f3 100644
253--- a/src/boot/bless-boot.c 223--- a/src/boot/bless-boot.c
254+++ b/src/boot/bless-boot.c 224+++ b/src/boot/bless-boot.c
255@@ -18,6 +18,7 @@ 225@@ -19,6 +19,7 @@
256 #include "util.h" 226 #include "util.h"
257 #include "verbs.h" 227 #include "verbs.h"
258 #include "virt.h" 228 #include "virt.h"
@@ -260,23 +230,9 @@ index 3fc319ca27..90064c90f3 100644
260 230
261 static char **arg_path = NULL; 231 static char **arg_path = NULL;
262 232
263diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
264index 84c3caf3a5..0fa84eaa38 100644
265--- a/src/core/dbus-cgroup.c
266+++ b/src/core/dbus-cgroup.c
267@@ -20,6 +20,7 @@
268 #include "parse-util.h"
269 #include "path-util.h"
270 #include "percent-util.h"
271+#include "missing_stdlib.h"
272
273 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
274
275diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
276index 902e074bd2..ac15b944e6 100644
277--- a/src/core/dbus-execute.c 233--- a/src/core/dbus-execute.c
278+++ b/src/core/dbus-execute.c 234+++ b/src/core/dbus-execute.c
279@@ -42,6 +42,7 @@ 235@@ -44,6 +44,7 @@
280 #include "unit-printf.h" 236 #include "unit-printf.h"
281 #include "user-util.h" 237 #include "user-util.h"
282 #include "utf8.h" 238 #include "utf8.h"
@@ -284,8 +240,6 @@ index 902e074bd2..ac15b944e6 100644
284 240
285 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); 241 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
286 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); 242 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
287diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
288index ca9b399d8c..b864480a8c 100644
289--- a/src/core/dbus-util.c 243--- a/src/core/dbus-util.c
290+++ b/src/core/dbus-util.c 244+++ b/src/core/dbus-util.c
291@@ -9,6 +9,7 @@ 245@@ -9,6 +9,7 @@
@@ -296,11 +250,9 @@ index ca9b399d8c..b864480a8c 100644
296 250
297 int bus_property_get_triggered_unit( 251 int bus_property_get_triggered_unit(
298 sd_bus *bus, 252 sd_bus *bus,
299diff --git a/src/core/execute.c b/src/core/execute.c
300index 2f2de4d9cf..515b2fe748 100644
301--- a/src/core/execute.c 253--- a/src/core/execute.c
302+++ b/src/core/execute.c 254+++ b/src/core/execute.c
303@@ -98,6 +98,7 @@ 255@@ -102,6 +102,7 @@
304 #include "unit-serialize.h" 256 #include "unit-serialize.h"
305 #include "user-util.h" 257 #include "user-util.h"
306 #include "utmp-wtmp.h" 258 #include "utmp-wtmp.h"
@@ -308,23 +260,19 @@ index 2f2de4d9cf..515b2fe748 100644
308 260
309 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) 261 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
310 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) 262 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
311diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
312index a56f12f47f..6b8729ef67 100644
313--- a/src/core/kmod-setup.c 263--- a/src/core/kmod-setup.c
314+++ b/src/core/kmod-setup.c 264+++ b/src/core/kmod-setup.c
315@@ -11,6 +11,7 @@ 265@@ -11,6 +11,7 @@
316 #include "macro.h" 266 #include "recurse-dir.h"
317 #include "string-util.h" 267 #include "string-util.h"
318 #include "missing_type.h" 268 #include "missing_type.h"
319+#include "missing_stdlib.h" 269+#include "missing_stdlib.h"
320 270
321 #if HAVE_KMOD 271 #if HAVE_KMOD
322 #include "module-util.h" 272 #include "module-util.h"
323diff --git a/src/core/service.c b/src/core/service.c
324index 7b90822f68..4af076eeba 100644
325--- a/src/core/service.c 273--- a/src/core/service.c
326+++ b/src/core/service.c 274+++ b/src/core/service.c
327@@ -41,6 +41,7 @@ 275@@ -42,6 +42,7 @@
328 #include "unit.h" 276 #include "unit.h"
329 #include "utf8.h" 277 #include "utf8.h"
330 #include "util.h" 278 #include "util.h"
@@ -332,8 +280,6 @@ index 7b90822f68..4af076eeba 100644
332 280
333 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { 281 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
334 [SERVICE_DEAD] = UNIT_INACTIVE, 282 [SERVICE_DEAD] = UNIT_INACTIVE,
335diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
336index 95c3fca661..d4a9f27b08 100644
337--- a/src/coredump/coredump-vacuum.c 283--- a/src/coredump/coredump-vacuum.c
338+++ b/src/coredump/coredump-vacuum.c 284+++ b/src/coredump/coredump-vacuum.c
339@@ -16,6 +16,7 @@ 285@@ -16,6 +16,7 @@
@@ -344,8 +290,6 @@ index 95c3fca661..d4a9f27b08 100644
344 290
345 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ 291 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
346 #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ 292 #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
347diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
348index ae1d43756a..24de98c9f3 100644
349--- a/src/journal-remote/journal-remote-main.c 293--- a/src/journal-remote/journal-remote-main.c
350+++ b/src/journal-remote/journal-remote-main.c 294+++ b/src/journal-remote/journal-remote-main.c
351@@ -24,6 +24,7 @@ 295@@ -24,6 +24,7 @@
@@ -356,11 +300,9 @@ index ae1d43756a..24de98c9f3 100644
356 300
357 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" 301 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
358 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" 302 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
359diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
360index 3eac97510d..db6913bc7a 100644
361--- a/src/journal/journalctl.c 303--- a/src/journal/journalctl.c
362+++ b/src/journal/journalctl.c 304+++ b/src/journal/journalctl.c
363@@ -72,6 +72,7 @@ 305@@ -73,6 +73,7 @@
364 #include "unit-name.h" 306 #include "unit-name.h"
365 #include "user-util.h" 307 #include "user-util.h"
366 #include "varlink.h" 308 #include "varlink.h"
@@ -368,8 +310,6 @@ index 3eac97510d..db6913bc7a 100644
368 310
369 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) 311 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
370 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ 312 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */
371diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
372index 20f7396c74..3471311ef5 100644
373--- a/src/libsystemd/sd-bus/bus-message.c 313--- a/src/libsystemd/sd-bus/bus-message.c
374+++ b/src/libsystemd/sd-bus/bus-message.c 314+++ b/src/libsystemd/sd-bus/bus-message.c
375@@ -20,6 +20,7 @@ 315@@ -20,6 +20,7 @@
@@ -380,8 +320,6 @@ index 20f7396c74..3471311ef5 100644
380 320
381 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); 321 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
382 322
383diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
384index bfd42aea7d..daefc56e3e 100644
385--- a/src/libsystemd/sd-bus/bus-objects.c 323--- a/src/libsystemd/sd-bus/bus-objects.c
386+++ b/src/libsystemd/sd-bus/bus-objects.c 324+++ b/src/libsystemd/sd-bus/bus-objects.c
387@@ -12,6 +12,7 @@ 325@@ -12,6 +12,7 @@
@@ -392,11 +330,9 @@ index bfd42aea7d..daefc56e3e 100644
392 330
393 static int node_vtable_get_userdata( 331 static int node_vtable_get_userdata(
394 sd_bus *bus, 332 sd_bus *bus,
395diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
396index 09eb49c37f..82f1b3d1be 100644
397--- a/src/libsystemd/sd-bus/bus-socket.c 333--- a/src/libsystemd/sd-bus/bus-socket.c
398+++ b/src/libsystemd/sd-bus/bus-socket.c 334+++ b/src/libsystemd/sd-bus/bus-socket.c
399@@ -27,6 +27,7 @@ 335@@ -28,6 +28,7 @@
400 #include "string-util.h" 336 #include "string-util.h"
401 #include "user-util.h" 337 #include "user-util.h"
402 #include "utf8.h" 338 #include "utf8.h"
@@ -404,11 +340,9 @@ index 09eb49c37f..82f1b3d1be 100644
404 340
405 #define SNDBUF_SIZE (8*1024*1024) 341 #define SNDBUF_SIZE (8*1024*1024)
406 342
407diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
408index ab8d4e4a60..7e35fbe9e6 100644
409--- a/src/libsystemd/sd-bus/sd-bus.c 343--- a/src/libsystemd/sd-bus/sd-bus.c
410+++ b/src/libsystemd/sd-bus/sd-bus.c 344+++ b/src/libsystemd/sd-bus/sd-bus.c
411@@ -42,6 +42,7 @@ 345@@ -43,6 +43,7 @@
412 #include "string-util.h" 346 #include "string-util.h"
413 #include "strv.h" 347 #include "strv.h"
414 #include "user-util.h" 348 #include "user-util.h"
@@ -416,8 +350,6 @@ index ab8d4e4a60..7e35fbe9e6 100644
416 350
417 #define log_debug_bus_message(m) \ 351 #define log_debug_bus_message(m) \
418 do { \ 352 do { \
419diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
420index 13c08fe295..9aae83486e 100644
421--- a/src/libsystemd/sd-bus/test-bus-benchmark.c 353--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
422+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c 354+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
423@@ -14,6 +14,7 @@ 355@@ -14,6 +14,7 @@
@@ -428,11 +360,9 @@ index 13c08fe295..9aae83486e 100644
428 360
429 #define MAX_SIZE (2*1024*1024) 361 #define MAX_SIZE (2*1024*1024)
430 362
431diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
432index b3240177cb..7e3ae2d24f 100644
433--- a/src/libsystemd/sd-journal/sd-journal.c 363--- a/src/libsystemd/sd-journal/sd-journal.c
434+++ b/src/libsystemd/sd-journal/sd-journal.c 364+++ b/src/libsystemd/sd-journal/sd-journal.c
435@@ -40,6 +40,7 @@ 365@@ -41,6 +41,7 @@
436 #include "string-util.h" 366 #include "string-util.h"
437 #include "strv.h" 367 #include "strv.h"
438 #include "syslog-util.h" 368 #include "syslog-util.h"
@@ -440,8 +370,6 @@ index b3240177cb..7e3ae2d24f 100644
440 370
441 #define JOURNAL_FILES_MAX 7168 371 #define JOURNAL_FILES_MAX 7168
442 372
443diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
444index d2f0566dbc..3b7746557e 100644
445--- a/src/locale/keymap-util.c 373--- a/src/locale/keymap-util.c
446+++ b/src/locale/keymap-util.c 374+++ b/src/locale/keymap-util.c
447@@ -24,6 +24,7 @@ 375@@ -24,6 +24,7 @@
@@ -452,8 +380,6 @@ index d2f0566dbc..3b7746557e 100644
452 380
453 static bool startswith_comma(const char *s, const char *prefix) { 381 static bool startswith_comma(const char *s, const char *prefix) {
454 s = startswith(s, prefix); 382 s = startswith(s, prefix);
455diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
456index f8bd17eefe..9633fbc152 100644
457--- a/src/login/pam_systemd.c 383--- a/src/login/pam_systemd.c
458+++ b/src/login/pam_systemd.c 384+++ b/src/login/pam_systemd.c
459@@ -31,6 +31,7 @@ 385@@ -31,6 +31,7 @@
@@ -464,8 +390,6 @@ index f8bd17eefe..9633fbc152 100644
464 #include "pam-util.h" 390 #include "pam-util.h"
465 #include "parse-util.h" 391 #include "parse-util.h"
466 #include "path-util.h" 392 #include "path-util.h"
467diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
468index 60e074e99b..a728e3b7a1 100644
469--- a/src/network/generator/network-generator.c 393--- a/src/network/generator/network-generator.c
470+++ b/src/network/generator/network-generator.c 394+++ b/src/network/generator/network-generator.c
471@@ -13,6 +13,7 @@ 395@@ -13,6 +13,7 @@
@@ -476,8 +400,6 @@ index 60e074e99b..a728e3b7a1 100644
476 400
477 /* 401 /*
478 # .network 402 # .network
479diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
480index 3847fe4ec4..3696b57baa 100644
481--- a/src/nspawn/nspawn-settings.c 403--- a/src/nspawn/nspawn-settings.c
482+++ b/src/nspawn/nspawn-settings.c 404+++ b/src/nspawn/nspawn-settings.c
483@@ -17,6 +17,7 @@ 405@@ -17,6 +17,7 @@
@@ -488,8 +410,6 @@ index 3847fe4ec4..3696b57baa 100644
488 410
489 Settings *settings_new(void) { 411 Settings *settings_new(void) {
490 Settings *s; 412 Settings *s;
491diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
492index 44715bb3e5..bc1e688b5e 100644
493--- a/src/nss-mymachines/nss-mymachines.c 413--- a/src/nss-mymachines/nss-mymachines.c
494+++ b/src/nss-mymachines/nss-mymachines.c 414+++ b/src/nss-mymachines/nss-mymachines.c
495@@ -21,6 +21,7 @@ 415@@ -21,6 +21,7 @@
@@ -498,34 +418,28 @@ index 44715bb3e5..bc1e688b5e 100644
498 #include "string-util.h" 418 #include "string-util.h"
499+#include "missing_stdlib.h" 419+#include "missing_stdlib.h"
500 420
501 static void setup_logging(void) { 421 static void setup_logging_once(void) {
502 /* We need a dummy function because log_parse_environment is a macro. */ 422 static pthread_once_t once = PTHREAD_ONCE_INIT;
503diff --git a/src/portable/portable.c b/src/portable/portable.c
504index 4cf5fb4f0a..577dc5c8d7 100644
505--- a/src/portable/portable.c 423--- a/src/portable/portable.c
506+++ b/src/portable/portable.c 424+++ b/src/portable/portable.c
507@@ -34,6 +34,7 @@ 425@@ -39,6 +39,7 @@
508 #include "strv.h" 426 #include "strv.h"
509 #include "tmpfile-util.h" 427 #include "tmpfile-util.h"
510 #include "user-util.h" 428 #include "user-util.h"
511+#include "missing_stdlib.h" 429+#include "missing_stdlib.h"
512 430
513 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile"); 431 /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was
514 432 * dropped there by the portable service logic and b) for which image it was dropped there. */
515diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
516index 7d13ed3905..ddc37115b8 100644
517--- a/src/resolve/resolvectl.c 433--- a/src/resolve/resolvectl.c
518+++ b/src/resolve/resolvectl.c 434+++ b/src/resolve/resolvectl.c
519@@ -41,6 +41,7 @@ 435@@ -43,6 +43,7 @@
520 #include "terminal-util.h"
521 #include "utf8.h" 436 #include "utf8.h"
437 #include "verb-log-control.h"
522 #include "verbs.h" 438 #include "verbs.h"
523+#include "missing_stdlib.h" 439+#include "missing_stdlib.h"
524 440
525 static int arg_family = AF_UNSPEC; 441 static int arg_family = AF_UNSPEC;
526 static int arg_ifindex = 0; 442 static int arg_ifindex = 0;
527diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
528index feb6d3807f..eb11d29e50 100644
529--- a/src/shared/bus-get-properties.c 443--- a/src/shared/bus-get-properties.c
530+++ b/src/shared/bus-get-properties.c 444+++ b/src/shared/bus-get-properties.c
531@@ -4,6 +4,7 @@ 445@@ -4,6 +4,7 @@
@@ -536,8 +450,6 @@ index feb6d3807f..eb11d29e50 100644
536 450
537 int bus_property_get_bool( 451 int bus_property_get_bool(
538 sd_bus *bus, 452 sd_bus *bus,
539diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
540index 6f4a71138c..4a46de2c1b 100644
541--- a/src/shared/bus-unit-procs.c 453--- a/src/shared/bus-unit-procs.c
542+++ b/src/shared/bus-unit-procs.c 454+++ b/src/shared/bus-unit-procs.c
543@@ -10,6 +10,7 @@ 455@@ -10,6 +10,7 @@
@@ -548,11 +460,9 @@ index 6f4a71138c..4a46de2c1b 100644
548 460
549 struct CGroupInfo { 461 struct CGroupInfo {
550 char *cgroup_path; 462 char *cgroup_path;
551diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
552index d3a5b25d18..003594e2d7 100644
553--- a/src/shared/bus-unit-util.c 463--- a/src/shared/bus-unit-util.c
554+++ b/src/shared/bus-unit-util.c 464+++ b/src/shared/bus-unit-util.c
555@@ -47,6 +47,7 @@ 465@@ -49,6 +49,7 @@
556 #include "unit-def.h" 466 #include "unit-def.h"
557 #include "user-util.h" 467 #include "user-util.h"
558 #include "utf8.h" 468 #include "utf8.h"
@@ -560,8 +470,6 @@ index d3a5b25d18..003594e2d7 100644
560 470
561 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { 471 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
562 assert(message); 472 assert(message);
563diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
564index 64ca67993c..31e3d148ea 100644
565--- a/src/shared/bus-util.c 473--- a/src/shared/bus-util.c
566+++ b/src/shared/bus-util.c 474+++ b/src/shared/bus-util.c
567@@ -21,6 +21,7 @@ 475@@ -21,6 +21,7 @@
@@ -572,8 +480,6 @@ index 64ca67993c..31e3d148ea 100644
572 480
573 static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { 481 static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
574 sd_event *e = userdata; 482 sd_event *e = userdata;
575diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
576index 787bb8fec9..009589a16f 100644
577--- a/src/shared/dns-domain.c 483--- a/src/shared/dns-domain.c
578+++ b/src/shared/dns-domain.c 484+++ b/src/shared/dns-domain.c
579@@ -17,6 +17,7 @@ 485@@ -17,6 +17,7 @@
@@ -584,8 +490,6 @@ index 787bb8fec9..009589a16f 100644
584 490
585 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { 491 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
586 const char *n; 492 const char *n;
587diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
588index 9e11dc09c1..f9954c1520 100644
589--- a/src/shared/journal-importer.c 493--- a/src/shared/journal-importer.c
590+++ b/src/shared/journal-importer.c 494+++ b/src/shared/journal-importer.c
591@@ -15,6 +15,7 @@ 495@@ -15,6 +15,7 @@
@@ -596,11 +500,9 @@ index 9e11dc09c1..f9954c1520 100644
596 500
597 enum { 501 enum {
598 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ 502 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
599diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
600index e63c59bd94..dd9773c009 100644
601--- a/src/shared/logs-show.c 503--- a/src/shared/logs-show.c
602+++ b/src/shared/logs-show.c 504+++ b/src/shared/logs-show.c
603@@ -41,6 +41,7 @@ 505@@ -42,6 +42,7 @@
604 #include "utf8.h" 506 #include "utf8.h"
605 #include "util.h" 507 #include "util.h"
606 #include "web-util.h" 508 #include "web-util.h"
@@ -608,8 +510,6 @@ index e63c59bd94..dd9773c009 100644
608 510
609 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ 511 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
610 #define PRINT_LINE_THRESHOLD 3 512 #define PRINT_LINE_THRESHOLD 3
611diff --git a/src/shared/pager.c b/src/shared/pager.c
612index 4bbad7e37b..eefcdd068c 100644
613--- a/src/shared/pager.c 513--- a/src/shared/pager.c
614+++ b/src/shared/pager.c 514+++ b/src/shared/pager.c
615@@ -26,6 +26,7 @@ 515@@ -26,6 +26,7 @@
@@ -620,8 +520,6 @@ index 4bbad7e37b..eefcdd068c 100644
620 520
621 static pid_t pager_pid = 0; 521 static pid_t pager_pid = 0;
622 522
623diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
624index 5d5bf7f21d..f1002ffa6c 100644
625--- a/src/shared/uid-range.c 523--- a/src/shared/uid-range.c
626+++ b/src/shared/uid-range.c 524+++ b/src/shared/uid-range.c
627@@ -9,6 +9,7 @@ 525@@ -9,6 +9,7 @@
@@ -632,8 +530,6 @@ index 5d5bf7f21d..f1002ffa6c 100644
632 530
633 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { 531 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
634 assert(range); 532 assert(range);
635diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
636index 6e3ee0d76b..7727e33d95 100644
637--- a/src/socket-proxy/socket-proxyd.c 533--- a/src/socket-proxy/socket-proxyd.c
638+++ b/src/socket-proxy/socket-proxyd.c 534+++ b/src/socket-proxy/socket-proxyd.c
639@@ -26,6 +26,7 @@ 535@@ -26,6 +26,7 @@
@@ -644,20 +540,16 @@ index 6e3ee0d76b..7727e33d95 100644
644 540
645 #define BUFFER_SIZE (256 * 1024) 541 #define BUFFER_SIZE (256 * 1024)
646 542
647diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
648index c9d318b8d1..fcb8d40805 100644
649--- a/src/test/test-hexdecoct.c 543--- a/src/test/test-hexdecoct.c
650+++ b/src/test/test-hexdecoct.c 544+++ b/src/test/test-hexdecoct.c
651@@ -6,6 +6,7 @@ 545@@ -7,6 +7,7 @@
652 #include "hexdecoct.h"
653 #include "macro.h" 546 #include "macro.h"
547 #include "random-util.h"
654 #include "string-util.h" 548 #include "string-util.h"
655+#include "missing_stdlib.h" 549+#include "missing_stdlib.h"
550 #include "tests.h"
656 551
657 static void test_hexchar(void) { 552 TEST(hexchar) {
658 assert_se(hexchar(0xa) == 'a');
659diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
660index 65c40de4c8..4ef9a0c6c8 100644
661--- a/src/udev/udev-builtin-path_id.c 553--- a/src/udev/udev-builtin-path_id.c
662+++ b/src/udev/udev-builtin-path_id.c 554+++ b/src/udev/udev-builtin-path_id.c
663@@ -22,6 +22,7 @@ 555@@ -22,6 +22,7 @@
@@ -668,11 +560,9 @@ index 65c40de4c8..4ef9a0c6c8 100644
668 560
669 _printf_(2,3) 561 _printf_(2,3)
670 static void path_prepend(char **path, const char *fmt, ...) { 562 static void path_prepend(char **path, const char *fmt, ...) {
671diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
672index 9854270b27..71b5fab1e7 100644
673--- a/src/udev/udev-event.c 563--- a/src/udev/udev-event.c
674+++ b/src/udev/udev-event.c 564+++ b/src/udev/udev-event.c
675@@ -34,6 +34,7 @@ 565@@ -35,6 +35,7 @@
676 #include "udev-util.h" 566 #include "udev-util.h"
677 #include "udev-watch.h" 567 #include "udev-watch.h"
678 #include "user-util.h" 568 #include "user-util.h"
@@ -680,11 +570,9 @@ index 9854270b27..71b5fab1e7 100644
680 570
681 typedef struct Spawn { 571 typedef struct Spawn {
682 sd_device *device; 572 sd_device *device;
683diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
684index bf997fc0ed..e3f5f1f2e2 100644
685--- a/src/udev/udev-rules.c 573--- a/src/udev/udev-rules.c
686+++ b/src/udev/udev-rules.c 574+++ b/src/udev/udev-rules.c
687@@ -33,6 +33,7 @@ 575@@ -34,6 +34,7 @@
688 #include "udev-util.h" 576 #include "udev-util.h"
689 #include "user-util.h" 577 #include "user-util.h"
690 #include "virt.h" 578 #include "virt.h"
@@ -692,3 +580,23 @@ index bf997fc0ed..e3f5f1f2e2 100644
692 580
693 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") 581 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
694 582
583--- a/src/core/dbus-cgroup.c
584+++ b/src/core/dbus-cgroup.c
585@@ -21,6 +21,7 @@
586 #include "parse-util.h"
587 #include "path-util.h"
588 #include "percent-util.h"
589+#include "missing_stdlib.h"
590 #include "socket-util.h"
591
592 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
593--- a/src/fstab-generator/fstab-generator.c
594+++ b/src/fstab-generator/fstab-generator.c
595@@ -29,6 +29,7 @@
596 #include "util.h"
597 #include "virt.h"
598 #include "volatile-util.h"
599+#include "missing_stdlib.h"
600
601 typedef enum MountPointFlags {
602 MOUNT_NOAUTO = 1 << 0,