summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
diff options
context:
space:
mode:
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.patch502
1 files changed, 377 insertions, 125 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 adfc3b7861..0462d52d5e 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
@@ -1,7 +1,7 @@
-From 399fd3eda3045636a70da438a0fd1406cc332ed1 Mon Sep 17 00:00:00 2001
+From db6551741a3654d8e75aff93ea00fbff579f7b02 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 14:18:21 +0800
-Subject: [PATCH 05/24] src/basic/missing.h: check for missing strndupa
+Subject: [PATCH] src/basic/missing.h: check for missing strndupa
include missing.h for definition of strndupa
@@ -13,79 +13,127 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
[rebased for systemd 243]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
+[rebased for systemd 244]
+[Rebased for v247]
+Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
+
---
meson.build | 1 +
src/backlight/backlight.c | 1 +
+ src/basic/cgroup-util.c | 1 +
src/basic/env-util.c | 1 +
+ src/basic/log.c | 1 +
src/basic/missing_stdlib.h | 12 ++++++++++++
src/basic/mkdir.c | 1 +
+ src/basic/mountpoint-util.c | 1 +
src/basic/parse-util.c | 1 +
+ src/basic/path-lookup.c | 1 +
+ src/basic/percent-util.c | 1 +
src/basic/proc-cmdline.c | 1 +
src/basic/procfs-util.c | 1 +
src/basic/time-util.c | 1 +
+ src/boot/bless-boot.c | 1 +
src/core/dbus-cgroup.c | 1 +
+ src/core/dbus-execute.c | 1 +
src/core/dbus-util.c | 1 +
+ src/core/execute.c | 1 +
src/core/kmod-setup.c | 1 +
src/core/service.c | 1 +
+ src/coredump/coredump-vacuum.c | 1 +
+ src/journal-remote/journal-remote-main.c | 1 +
src/journal/journalctl.c | 1 +
src/libsystemd/sd-bus/bus-message.c | 1 +
src/libsystemd/sd-bus/bus-objects.c | 1 +
+ src/libsystemd/sd-bus/bus-socket.c | 1 +
+ src/libsystemd/sd-bus/sd-bus.c | 1 +
src/libsystemd/sd-bus/test-bus-benchmark.c | 1 +
+ src/libsystemd/sd-journal/sd-journal.c | 1 +
src/locale/keymap-util.c | 1 +
src/login/pam_systemd.c | 1 +
src/network/generator/network-generator.c | 1 +
src/nspawn/nspawn-settings.c | 1 +
+ src/nss-mymachines/nss-mymachines.c | 1 +
+ src/portable/portable.c | 1 +
+ src/resolve/resolvectl.c | 1 +
+ src/shared/bus-get-properties.c | 1 +
+ src/shared/bus-unit-procs.c | 1 +
+ src/shared/bus-unit-util.c | 1 +
+ src/shared/bus-util.c | 1 +
src/shared/dns-domain.c | 1 +
src/shared/journal-importer.c | 1 +
src/shared/logs-show.c | 1 +
src/shared/pager.c | 1 +
- src/shared/path-lookup.c | 1 +
src/shared/uid-range.c | 1 +
src/socket-proxy/socket-proxyd.c | 1 +
src/test/test-hexdecoct.c | 1 +
src/udev/udev-builtin-path_id.c | 1 +
src/udev/udev-event.c | 1 +
src/udev/udev-rules.c | 1 +
- 32 files changed, 43 insertions(+)
+ 51 files changed, 62 insertions(+)
diff --git a/meson.build b/meson.build
-index 7f8c679411..81c061b768 100644
+index 1aa20b8246..aafee71eb4 100644
--- a/meson.build
+++ b/meson.build
-@@ -506,6 +506,7 @@ foreach ident : [
- #include <unistd.h>'''],
- ['get_mempolicy', '''#include <stdlib.h>
- #include <unistd.h>'''],
-+ ['strndupa' , '''#include <string.h>'''],
- ]
+@@ -480,6 +480,7 @@ foreach ident : ['secure_getenv', '__secure_getenv']
+ endforeach
- have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+ foreach ident : [
++ ['strndupa' , '''#include <string.h>'''],
+ ['memfd_create', '''#include <sys/mman.h>'''],
+ ['gettid', '''#include <sys/types.h>
+ #include <unistd.h>'''],
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
-index dfd6805398..c2b2ace6ec 100644
+index 7c0970a60c..c129ff0f4f 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
-@@ -17,6 +17,7 @@
+@@ -19,6 +19,7 @@
#include "string-util.h"
#include "strv.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
+
+ static int help(void) {
+ _cleanup_free_ char *link = NULL;
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index 1ff6160dc8..c9efd862a2 100644
+--- a/src/basic/cgroup-util.c
++++ b/src/basic/cgroup-util.c
+@@ -38,6 +38,7 @@
+ #include "unit-name.h"
+ #include "user-util.h"
+ #include "xattr-util.h"
++#include "missing_stdlib.h"
- static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
- const char *subsystem, *sysname, *value;
+ static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
+ _cleanup_free_ char *fs = NULL;
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
-index a6503cf2b6..ceef9a62c8 100644
+index 81b1e3f10e..8fedcfd1cd 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
-@@ -16,6 +16,7 @@
+@@ -18,6 +18,7 @@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
+
+ /* We follow bash for the character set. Different shells have different rules. */
+ #define VALID_BASH_ENV_NAME_CHARS \
+diff --git a/src/basic/log.c b/src/basic/log.c
+index fb183ea9e7..82e7bdff60 100644
+--- a/src/basic/log.c
++++ b/src/basic/log.c
+@@ -36,6 +36,7 @@
+ #include "terminal-util.h"
+ #include "time-util.h"
+ #include "utf8.h"
++#include "missing_stdlib.h"
+
+ #define SNDBUF_SIZE (8*1024*1024)
- #define VALID_CHARS_ENV_NAME \
- DIGITS LETTERS \
diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
-index 188a8d4406..1e16ec287a 100644
+index 8c76f93eb2..9068bfb4f0 100644
--- a/src/basic/missing_stdlib.h
+++ b/src/basic/missing_stdlib.h
@@ -11,3 +11,15 @@
@@ -105,338 +153,542 @@ index 188a8d4406..1e16ec287a 100644
+ })
+#endif
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index 6b82eab640..51c6b78615 100644
+index f91f8f7a08..fb31596216 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
@@ -14,6 +14,7 @@
#include "stat-util.h"
#include "stdio-util.h"
#include "user-util.h"
-+#include "missing.h"
-
- int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) {
- struct stat st;
++#include "missing_stdlib.h"
+
+ int mkdir_safe_internal(
+ const char *path,
+diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
+index 8c836a1b74..2eb7e5a634 100644
+--- a/src/basic/mountpoint-util.c
++++ b/src/basic/mountpoint-util.c
+@@ -11,6 +11,7 @@
+ #include "missing_stat.h"
+ #include "missing_syscall.h"
+ #include "mkdir.h"
++#include "missing_stdlib.h"
+ #include "mountpoint-util.h"
+ #include "parse-util.h"
+ #include "path-util.h"
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
-index 115a1494a2..07a34bfd53 100644
+index b79c885dfd..6dabda5691 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
-@@ -20,6 +20,7 @@
- #include "process-util.h"
+@@ -19,6 +19,7 @@
#include "stat-util.h"
#include "string-util.h"
-+#include "missing.h"
+ #include "strv.h"
++#include "missing_stdlib.h"
int parse_boolean(const char *v) {
if (!v)
+diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
+index 05eb17d66c..b6026aab28 100644
+--- a/src/basic/path-lookup.c
++++ b/src/basic/path-lookup.c
+@@ -15,6 +15,7 @@
+ #include "strv.h"
+ #include "tmpfile-util.h"
+ #include "user-util.h"
++#include "missing_stdlib.h"
+
+ int xdg_user_runtime_dir(char **ret, const char *suffix) {
+ const char *e;
+diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c
+index 06f20fd61e..8159d721bb 100644
+--- a/src/basic/percent-util.c
++++ b/src/basic/percent-util.c
+@@ -3,6 +3,7 @@
+ #include "percent-util.h"
+ #include "string-util.h"
+ #include "parse-util.h"
++#include "missing_stdlib.h"
+
+ static int parse_parts_value_whole(const char *p, const char *symbol) {
+ const char *pc, *n;
diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
-index 09169cf963..f411ba897f 100644
+index 410b8a3eb5..f2c4355609 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -15,6 +15,7 @@
#include "string-util.h"
#include "util.h"
#include "virt.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
int proc_cmdline(char **ret) {
const char *e;
diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
-index 7aaf95bfce..42ce53d5aa 100644
+index 9234ccaf85..8c57094225 100644
--- a/src/basic/procfs-util.c
+++ b/src/basic/procfs-util.c
@@ -11,6 +11,7 @@
#include "procfs-util.h"
#include "stdio-util.h"
#include "string-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
int procfs_tasks_get_limit(uint64_t *ret) {
_cleanup_free_ char *value = NULL;
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
-index 3018e81acb..4e2b3b66c1 100644
+index 5d162e8ffe..1cde8e4262 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
-@@ -28,6 +28,7 @@
+@@ -26,6 +26,7 @@
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static clockid_t map_clock_id(clockid_t c) {
+diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
+index 3fc319ca27..90064c90f3 100644
+--- a/src/boot/bless-boot.c
++++ b/src/boot/bless-boot.c
+@@ -18,6 +18,7 @@
+ #include "util.h"
+ #include "verbs.h"
+ #include "virt.h"
++#include "missing_stdlib.h"
+
+ static char **arg_path = NULL;
+
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
-index 2f2313c599..c9937f9d62 100644
+index 84c3caf3a5..0fa84eaa38 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
-@@ -15,6 +15,7 @@
- #include "fileio.h"
- #include "limits-util.h"
+@@ -20,6 +20,7 @@
+ #include "parse-util.h"
#include "path-util.h"
-+#include "missing.h"
+ #include "percent-util.h"
++#include "missing_stdlib.h"
- static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
+ BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
+diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
+index 50daef6702..1cc6d91e64 100644
+--- a/src/core/dbus-execute.c
++++ b/src/core/dbus-execute.c
+@@ -42,6 +42,7 @@
+ #include "unit-printf.h"
+ #include "user-util.h"
+ #include "utf8.h"
++#include "missing_stdlib.h"
+
+ BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
+ static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
-index 7862beaacb..19f6968cfe 100644
+index ca9b399d8c..b864480a8c 100644
--- a/src/core/dbus-util.c
+++ b/src/core/dbus-util.c
-@@ -7,6 +7,7 @@
+@@ -9,6 +9,7 @@
#include "unit-printf.h"
#include "user-util.h"
#include "unit.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
int bus_property_get_triggered_unit(
sd_bus *bus,
+diff --git a/src/core/execute.c b/src/core/execute.c
+index 2a337b55a2..2a64675c5f 100644
+--- a/src/core/execute.c
++++ b/src/core/execute.c
+@@ -98,6 +98,7 @@
+ #include "unit-serialize.h"
+ #include "user-util.h"
+ #include "utmp-wtmp.h"
++#include "missing_stdlib.h"
+
+ #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
+ #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
-index a91cfebc67..a45961013f 100644
+index a56f12f47f..6b8729ef67 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -11,6 +11,7 @@
- #include "kmod-setup.h"
#include "macro.h"
#include "string-util.h"
-+#include "missing.h"
+ #include "missing_type.h"
++#include "missing_stdlib.h"
#if HAVE_KMOD
- #include <libkmod.h>
+ #include "module-util.h"
diff --git a/src/core/service.c b/src/core/service.c
-index 73b3c9c316..ef74f00a08 100644
+index cb0a528f0d..740d305710 100644
--- a/src/core/service.c
+++ b/src/core/service.c
-@@ -43,6 +43,7 @@
+@@ -41,6 +41,7 @@
#include "unit.h"
#include "utf8.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
+diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
+index 95c3fca661..d4a9f27b08 100644
+--- a/src/coredump/coredump-vacuum.c
++++ b/src/coredump/coredump-vacuum.c
+@@ -16,6 +16,7 @@
+ #include "string-util.h"
+ #include "time-util.h"
+ #include "user-util.h"
++#include "missing_stdlib.h"
+
+ #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
+ #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
+diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
+index ae1d43756a..24de98c9f3 100644
+--- a/src/journal-remote/journal-remote-main.c
++++ b/src/journal-remote/journal-remote-main.c
+@@ -24,6 +24,7 @@
+ #include "stat-util.h"
+ #include "string-table.h"
+ #include "strv.h"
++#include "missing_stdlib.h"
+
+ #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
+ #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
-index 6d6bb1cf63..6666349a35 100644
+index c8fb726d42..858a425d12 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
-@@ -70,6 +70,7 @@
+@@ -72,6 +72,7 @@
#include "unit-name.h"
#include "user-util.h"
#include "varlink.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
#define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
-
+ #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
-index eb029e4453..f31fe9d5a8 100644
+index 20f7396c74..3471311ef5 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
-@@ -21,6 +21,7 @@
+@@ -20,6 +20,7 @@
#include "strv.h"
#include "time-util.h"
#include "utf8.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
-index ae643cacc7..1b752271a5 100644
+index bfd42aea7d..daefc56e3e 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
-@@ -13,6 +13,7 @@
+@@ -12,6 +12,7 @@
#include "set.h"
#include "string-util.h"
#include "strv.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static int node_vtable_get_userdata(
sd_bus *bus,
+diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
+index 378774fe8b..2694c177d5 100644
+--- a/src/libsystemd/sd-bus/bus-socket.c
++++ b/src/libsystemd/sd-bus/bus-socket.c
+@@ -27,6 +27,7 @@
+ #include "string-util.h"
+ #include "user-util.h"
+ #include "utf8.h"
++#include "missing_stdlib.h"
+
+ #define SNDBUF_SIZE (8*1024*1024)
+
+diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
+index a32e2f5e20..97fd3aec82 100644
+--- a/src/libsystemd/sd-bus/sd-bus.c
++++ b/src/libsystemd/sd-bus/sd-bus.c
+@@ -42,6 +42,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "user-util.h"
++#include "missing_stdlib.h"
+
+ #define log_debug_bus_message(m) \
+ do { \
diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
-index 8de0a859ee..4fd0a2e692 100644
+index 13c08fe295..9aae83486e 100644
--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
@@ -14,6 +14,7 @@
- #include "missing_resource.h"
+ #include "string-util.h"
#include "time-util.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
#define MAX_SIZE (2*1024*1024)
+diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
+index 5728c537bc..94885b0bf6 100644
+--- a/src/libsystemd/sd-journal/sd-journal.c
++++ b/src/libsystemd/sd-journal/sd-journal.c
+@@ -40,6 +40,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "syslog-util.h"
++#include "missing_stdlib.h"
+
+ #define JOURNAL_FILES_MAX 7168
+
diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
-index f8c36c94f5..41f5606aea 100644
+index d2f0566dbc..3b7746557e 100644
--- a/src/locale/keymap-util.c
+++ b/src/locale/keymap-util.c
-@@ -22,6 +22,7 @@
+@@ -24,6 +24,7 @@
#include "string-util.h"
#include "strv.h"
#include "tmpfile-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static bool startswith_comma(const char *s, const char *prefix) {
s = startswith(s, prefix);
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
-index 3f762cbbc3..005cfea658 100644
+index f8bd17eefe..9633fbc152 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
-@@ -28,6 +28,7 @@
- #include "hostname-util.h"
+@@ -31,6 +31,7 @@
+ #include "locale-util.h"
#include "login-util.h"
#include "macro.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
+ #include "pam-util.h"
#include "parse-util.h"
#include "path-util.h"
- #include "process-util.h"
diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
-index 0b5af33566..9c808cd014 100644
+index 60e074e99b..a728e3b7a1 100644
--- a/src/network/generator/network-generator.c
+++ b/src/network/generator/network-generator.c
@@ -13,6 +13,7 @@
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
/*
# .network
diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
-index 3a99736813..279fea4d88 100644
+index 3847fe4ec4..3696b57baa 100644
--- a/src/nspawn/nspawn-settings.c
+++ b/src/nspawn/nspawn-settings.c
-@@ -16,6 +16,7 @@
+@@ -17,6 +17,7 @@
#include "strv.h"
#include "user-util.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
Settings *settings_new(void) {
Settings *s;
+diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
+index 44715bb3e5..bc1e688b5e 100644
+--- a/src/nss-mymachines/nss-mymachines.c
++++ b/src/nss-mymachines/nss-mymachines.c
+@@ -21,6 +21,7 @@
+ #include "nss-util.h"
+ #include "signal-util.h"
+ #include "string-util.h"
++#include "missing_stdlib.h"
+
+ static void setup_logging(void) {
+ /* We need a dummy function because log_parse_environment is a macro. */
+diff --git a/src/portable/portable.c b/src/portable/portable.c
+index 4cf5fb4f0a..577dc5c8d7 100644
+--- a/src/portable/portable.c
++++ b/src/portable/portable.c
+@@ -34,6 +34,7 @@
+ #include "strv.h"
+ #include "tmpfile-util.h"
+ #include "user-util.h"
++#include "missing_stdlib.h"
+
+ static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
+
+diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
+index 7d13ed3905..ddc37115b8 100644
+--- a/src/resolve/resolvectl.c
++++ b/src/resolve/resolvectl.c
+@@ -41,6 +41,7 @@
+ #include "terminal-util.h"
+ #include "utf8.h"
+ #include "verbs.h"
++#include "missing_stdlib.h"
+
+ static int arg_family = AF_UNSPEC;
+ static int arg_ifindex = 0;
+diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
+index feb6d3807f..eb11d29e50 100644
+--- a/src/shared/bus-get-properties.c
++++ b/src/shared/bus-get-properties.c
+@@ -4,6 +4,7 @@
+ #include "rlimit-util.h"
+ #include "stdio-util.h"
+ #include "string-util.h"
++#include "missing_stdlib.h"
+
+ int bus_property_get_bool(
+ sd_bus *bus,
+diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
+index 6f4a71138c..4a46de2c1b 100644
+--- a/src/shared/bus-unit-procs.c
++++ b/src/shared/bus-unit-procs.c
+@@ -10,6 +10,7 @@
+ #include "sort-util.h"
+ #include "string-util.h"
+ #include "terminal-util.h"
++#include "missing_stdlib.h"
+
+ struct CGroupInfo {
+ char *cgroup_path;
+diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
+index d3a5b25d18..003594e2d7 100644
+--- a/src/shared/bus-unit-util.c
++++ b/src/shared/bus-unit-util.c
+@@ -47,6 +47,7 @@
+ #include "unit-def.h"
+ #include "user-util.h"
+ #include "utf8.h"
++#include "missing_stdlib.h"
+
+ int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
+ assert(message);
+diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
+index 64ca67993c..31e3d148ea 100644
+--- a/src/shared/bus-util.c
++++ b/src/shared/bus-util.c
+@@ -21,6 +21,7 @@
+ #include "path-util.h"
+ #include "socket-util.h"
+ #include "stdio-util.h"
++#include "missing_stdlib.h"
+
+ static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
+ sd_event *e = userdata;
diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
-index f62ad0a0f5..f1a27e158d 100644
+index 787bb8fec9..009589a16f 100644
--- a/src/shared/dns-domain.c
+++ b/src/shared/dns-domain.c
-@@ -24,6 +24,7 @@
+@@ -17,6 +17,7 @@
#include "string-util.h"
#include "strv.h"
#include "utf8.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
const char *n;
diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
-index 7c4fc7021d..a6ff2214df 100644
+index 9e11dc09c1..f9954c1520 100644
--- a/src/shared/journal-importer.c
+++ b/src/shared/journal-importer.c
-@@ -14,6 +14,7 @@
+@@ -15,6 +15,7 @@
#include "parse-util.h"
#include "string-util.h"
#include "unaligned.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
enum {
IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
-index b615c70dff..75b26e9c21 100644
+index e63c59bd94..dd9773c009 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
-@@ -39,6 +39,7 @@
- #include "time-util.h"
+@@ -41,6 +41,7 @@
#include "utf8.h"
#include "util.h"
-+#include "missing.h"
+ #include "web-util.h"
++#include "missing_stdlib.h"
/* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
#define PRINT_LINE_THRESHOLD 3
diff --git a/src/shared/pager.c b/src/shared/pager.c
-index 7c20b100b4..e4209d3a95 100644
+index 4bbad7e37b..eefcdd068c 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
#include "strv.h"
#include "terminal-util.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static pid_t pager_pid = 0;
-diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
-index 6bf0ff0316..f6c8009cd2 100644
---- a/src/shared/path-lookup.c
-+++ b/src/shared/path-lookup.c
-@@ -20,6 +20,7 @@
- #include "tmpfile-util.h"
- #include "user-util.h"
- #include "util.h"
-+#include "missing.h"
-
- int xdg_user_runtime_dir(char **ret, const char *suffix) {
- const char *e;
diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index 7cb7d8a477..8b12b91084 100644
+index 5d5bf7f21d..f1002ffa6c 100644
--- a/src/shared/uid-range.c
+++ b/src/shared/uid-range.c
@@ -9,6 +9,7 @@
#include "sort-util.h"
#include "uid-range.h"
#include "user-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
assert(range);
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
-index abbbc9f2d6..6179b5851e 100644
+index 6e3ee0d76b..7727e33d95 100644
--- a/src/socket-proxy/socket-proxyd.c
+++ b/src/socket-proxy/socket-proxyd.c
-@@ -28,6 +28,7 @@
+@@ -26,6 +26,7 @@
#include "socket-util.h"
#include "string-util.h"
#include "util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
#define BUFFER_SIZE (256 * 1024)
diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
-index 52217429b1..a05e7782f6 100644
+index c9d318b8d1..fcb8d40805 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
@@ -6,6 +6,7 @@
#include "hexdecoct.h"
#include "macro.h"
#include "string-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
static void test_hexchar(void) {
assert_se(hexchar(0xa) == 'a');
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
-index e8f1ce1354..8693cb02a4 100644
+index 65c40de4c8..4ef9a0c6c8 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
-@@ -23,6 +23,7 @@
- #include "strv.h"
+@@ -22,6 +22,7 @@
#include "sysexits.h"
#include "udev-builtin.h"
-+#include "missing.h"
+ #include "udev-util.h"
++#include "missing_stdlib.h"
_printf_(2,3)
static void path_prepend(char **path, const char *fmt, ...) {
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
-index 8cfa2cdf23..b0670c77ec 100644
+index b28089be71..a7e2232299 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
-@@ -35,6 +35,7 @@
+@@ -34,6 +34,7 @@
#include "udev-util.h"
#include "udev-watch.h"
#include "user-util.h"
-+#include "missing.h"
++#include "missing_stdlib.h"
typedef struct Spawn {
sd_device *device;
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
-index 1642f10535..fe2aa75478 100644
+index bf997fc0ed..e3f5f1f2e2 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
-@@ -28,6 +28,7 @@
- #include "udev-event.h"
- #include "udev-rules.h"
+@@ -33,6 +33,7 @@
+ #include "udev-util.h"
#include "user-util.h"
-+#include "missing.h"
+ #include "virt.h"
++#include "missing_stdlib.h"
#define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")