Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 399fd3eda3045636a70da438a0fd1406cc332ed1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 |
| 4 | Subject: [PATCH 05/24] src/basic/missing.h: check for missing strndupa |
| 5 | |
| 6 | include missing.h for definition of strndupa |
| 7 | |
| 8 | Upstream-Status: Inappropriate [musl specific] |
| 9 | |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 12 | [Rebased for v242] |
| 13 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 14 | [rebased for systemd 243] |
| 15 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | --- |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 17 | meson.build | 1 + |
| 18 | src/backlight/backlight.c | 1 + |
| 19 | src/basic/env-util.c | 1 + |
| 20 | src/basic/missing_stdlib.h | 12 ++++++++++++ |
| 21 | src/basic/mkdir.c | 1 + |
| 22 | src/basic/parse-util.c | 1 + |
| 23 | src/basic/proc-cmdline.c | 1 + |
| 24 | src/basic/procfs-util.c | 1 + |
| 25 | src/basic/time-util.c | 1 + |
| 26 | src/core/dbus-cgroup.c | 1 + |
| 27 | src/core/dbus-util.c | 1 + |
| 28 | src/core/kmod-setup.c | 1 + |
| 29 | src/core/service.c | 1 + |
| 30 | src/journal/journalctl.c | 1 + |
| 31 | src/libsystemd/sd-bus/bus-message.c | 1 + |
| 32 | src/libsystemd/sd-bus/bus-objects.c | 1 + |
| 33 | src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + |
| 34 | src/locale/keymap-util.c | 1 + |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 35 | src/login/pam_systemd.c | 1 + |
| 36 | src/network/generator/network-generator.c | 1 + |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 37 | src/nspawn/nspawn-settings.c | 1 + |
| 38 | src/shared/dns-domain.c | 1 + |
| 39 | src/shared/journal-importer.c | 1 + |
| 40 | src/shared/logs-show.c | 1 + |
| 41 | src/shared/pager.c | 1 + |
| 42 | src/shared/path-lookup.c | 1 + |
| 43 | src/shared/uid-range.c | 1 + |
| 44 | src/socket-proxy/socket-proxyd.c | 1 + |
| 45 | src/test/test-hexdecoct.c | 1 + |
| 46 | src/udev/udev-builtin-path_id.c | 1 + |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 47 | src/udev/udev-event.c | 1 + |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 48 | src/udev/udev-rules.c | 1 + |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 49 | 32 files changed, 43 insertions(+) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 50 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 51 | diff --git a/meson.build b/meson.build |
| 52 | index 7f8c679411..81c061b768 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | --- a/meson.build |
| 54 | +++ b/meson.build |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 55 | @@ -506,6 +506,7 @@ foreach ident : [ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 56 | #include <unistd.h>'''], |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 57 | ['get_mempolicy', '''#include <stdlib.h> |
| 58 | #include <unistd.h>'''], |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 59 | + ['strndupa' , '''#include <string.h>'''], |
| 60 | ] |
| 61 | |
| 62 | have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 63 | diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c |
| 64 | index dfd6805398..c2b2ace6ec 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 65 | --- a/src/backlight/backlight.c |
| 66 | +++ b/src/backlight/backlight.c |
| 67 | @@ -17,6 +17,7 @@ |
| 68 | #include "string-util.h" |
| 69 | #include "strv.h" |
| 70 | #include "util.h" |
| 71 | +#include "missing.h" |
| 72 | |
| 73 | static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { |
| 74 | const char *subsystem, *sysname, *value; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 75 | diff --git a/src/basic/env-util.c b/src/basic/env-util.c |
| 76 | index a6503cf2b6..ceef9a62c8 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 77 | --- a/src/basic/env-util.c |
| 78 | +++ b/src/basic/env-util.c |
| 79 | @@ -16,6 +16,7 @@ |
| 80 | #include "string-util.h" |
| 81 | #include "strv.h" |
| 82 | #include "utf8.h" |
| 83 | +#include "missing.h" |
| 84 | |
| 85 | #define VALID_CHARS_ENV_NAME \ |
| 86 | DIGITS LETTERS \ |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 87 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h |
| 88 | index 188a8d4406..1e16ec287a 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 89 | --- a/src/basic/missing_stdlib.h |
| 90 | +++ b/src/basic/missing_stdlib.h |
| 91 | @@ -11,3 +11,15 @@ |
Brad Bishop | c68388fc | 2019-08-26 01:33:31 -0400 | [diff] [blame] | 92 | # error "neither secure_getenv nor __secure_getenv are available" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 93 | # endif |
| 94 | #endif |
| 95 | + |
| 96 | +/* string.h */ |
| 97 | +#if ! HAVE_STRNDUPA |
| 98 | +#define strndupa(s, n) \ |
| 99 | + ({ \ |
| 100 | + const char *__old = (s); \ |
| 101 | + size_t __len = strnlen(__old, (n)); \ |
| 102 | + char *__new = (char *)alloca(__len + 1); \ |
| 103 | + __new[__len] = '\0'; \ |
| 104 | + (char *)memcpy(__new, __old, __len); \ |
| 105 | + }) |
| 106 | +#endif |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 107 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c |
| 108 | index 6b82eab640..51c6b78615 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 109 | --- a/src/basic/mkdir.c |
| 110 | +++ b/src/basic/mkdir.c |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 111 | @@ -14,6 +14,7 @@ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 112 | #include "stat-util.h" |
| 113 | #include "stdio-util.h" |
| 114 | #include "user-util.h" |
| 115 | +#include "missing.h" |
| 116 | |
| 117 | int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) { |
| 118 | struct stat st; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 119 | diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c |
| 120 | index 115a1494a2..07a34bfd53 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 121 | --- a/src/basic/parse-util.c |
| 122 | +++ b/src/basic/parse-util.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 123 | @@ -20,6 +20,7 @@ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 124 | #include "process-util.h" |
| 125 | #include "stat-util.h" |
| 126 | #include "string-util.h" |
| 127 | +#include "missing.h" |
| 128 | |
| 129 | int parse_boolean(const char *v) { |
| 130 | if (!v) |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 131 | diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c |
| 132 | index 09169cf963..f411ba897f 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 133 | --- a/src/basic/proc-cmdline.c |
| 134 | +++ b/src/basic/proc-cmdline.c |
| 135 | @@ -15,6 +15,7 @@ |
| 136 | #include "string-util.h" |
| 137 | #include "util.h" |
| 138 | #include "virt.h" |
| 139 | +#include "missing.h" |
| 140 | |
| 141 | int proc_cmdline(char **ret) { |
| 142 | const char *e; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 143 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c |
| 144 | index 7aaf95bfce..42ce53d5aa 100644 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 145 | --- a/src/basic/procfs-util.c |
| 146 | +++ b/src/basic/procfs-util.c |
| 147 | @@ -11,6 +11,7 @@ |
| 148 | #include "procfs-util.h" |
| 149 | #include "stdio-util.h" |
| 150 | #include "string-util.h" |
| 151 | +#include "missing.h" |
| 152 | |
| 153 | int procfs_tasks_get_limit(uint64_t *ret) { |
| 154 | _cleanup_free_ char *value = NULL; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 155 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c |
| 156 | index 3018e81acb..4e2b3b66c1 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 157 | --- a/src/basic/time-util.c |
| 158 | +++ b/src/basic/time-util.c |
| 159 | @@ -28,6 +28,7 @@ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 160 | #include "string-util.h" |
| 161 | #include "strv.h" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 162 | #include "time-util.h" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 163 | +#include "missing.h" |
| 164 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 165 | static clockid_t map_clock_id(clockid_t c) { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 166 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 167 | diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c |
| 168 | index 2f2313c599..c9937f9d62 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 169 | --- a/src/core/dbus-cgroup.c |
| 170 | +++ b/src/core/dbus-cgroup.c |
| 171 | @@ -15,6 +15,7 @@ |
| 172 | #include "fileio.h" |
| 173 | #include "limits-util.h" |
| 174 | #include "path-util.h" |
| 175 | +#include "missing.h" |
| 176 | |
| 177 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); |
| 178 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 179 | diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c |
| 180 | index 7862beaacb..19f6968cfe 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 181 | --- a/src/core/dbus-util.c |
| 182 | +++ b/src/core/dbus-util.c |
| 183 | @@ -7,6 +7,7 @@ |
| 184 | #include "unit-printf.h" |
| 185 | #include "user-util.h" |
| 186 | #include "unit.h" |
| 187 | +#include "missing.h" |
| 188 | |
| 189 | int bus_property_get_triggered_unit( |
| 190 | sd_bus *bus, |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 191 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c |
| 192 | index a91cfebc67..a45961013f 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 193 | --- a/src/core/kmod-setup.c |
| 194 | +++ b/src/core/kmod-setup.c |
| 195 | @@ -11,6 +11,7 @@ |
| 196 | #include "kmod-setup.h" |
| 197 | #include "macro.h" |
| 198 | #include "string-util.h" |
| 199 | +#include "missing.h" |
| 200 | |
| 201 | #if HAVE_KMOD |
| 202 | #include <libkmod.h> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 203 | diff --git a/src/core/service.c b/src/core/service.c |
| 204 | index 73b3c9c316..ef74f00a08 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 205 | --- a/src/core/service.c |
| 206 | +++ b/src/core/service.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 207 | @@ -43,6 +43,7 @@ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 208 | #include "unit.h" |
| 209 | #include "utf8.h" |
| 210 | #include "util.h" |
| 211 | +#include "missing.h" |
| 212 | |
| 213 | static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { |
| 214 | [SERVICE_DEAD] = UNIT_INACTIVE, |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 215 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c |
| 216 | index 6d6bb1cf63..6666349a35 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 217 | --- a/src/journal/journalctl.c |
| 218 | +++ b/src/journal/journalctl.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 219 | @@ -70,6 +70,7 @@ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 220 | #include "unit-name.h" |
| 221 | #include "user-util.h" |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 222 | #include "varlink.h" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 223 | +#include "missing.h" |
| 224 | |
| 225 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) |
| 226 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 227 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c |
| 228 | index eb029e4453..f31fe9d5a8 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 229 | --- a/src/libsystemd/sd-bus/bus-message.c |
| 230 | +++ b/src/libsystemd/sd-bus/bus-message.c |
| 231 | @@ -21,6 +21,7 @@ |
| 232 | #include "strv.h" |
| 233 | #include "time-util.h" |
| 234 | #include "utf8.h" |
| 235 | +#include "missing.h" |
| 236 | |
| 237 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); |
| 238 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 239 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c |
| 240 | index ae643cacc7..1b752271a5 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 241 | --- a/src/libsystemd/sd-bus/bus-objects.c |
| 242 | +++ b/src/libsystemd/sd-bus/bus-objects.c |
| 243 | @@ -13,6 +13,7 @@ |
| 244 | #include "set.h" |
| 245 | #include "string-util.h" |
| 246 | #include "strv.h" |
| 247 | +#include "missing.h" |
| 248 | |
| 249 | static int node_vtable_get_userdata( |
| 250 | sd_bus *bus, |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 251 | diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c |
| 252 | index 8de0a859ee..4fd0a2e692 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 253 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c |
| 254 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c |
| 255 | @@ -14,6 +14,7 @@ |
| 256 | #include "missing_resource.h" |
| 257 | #include "time-util.h" |
| 258 | #include "util.h" |
| 259 | +#include "missing.h" |
| 260 | |
| 261 | #define MAX_SIZE (2*1024*1024) |
| 262 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 263 | diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c |
| 264 | index f8c36c94f5..41f5606aea 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 265 | --- a/src/locale/keymap-util.c |
| 266 | +++ b/src/locale/keymap-util.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 267 | @@ -22,6 +22,7 @@ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 268 | #include "string-util.h" |
| 269 | #include "strv.h" |
| 270 | #include "tmpfile-util.h" |
| 271 | +#include "missing.h" |
| 272 | |
| 273 | static bool startswith_comma(const char *s, const char *prefix) { |
| 274 | s = startswith(s, prefix); |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 275 | diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c |
| 276 | index 3f762cbbc3..005cfea658 100644 |
| 277 | --- a/src/login/pam_systemd.c |
| 278 | +++ b/src/login/pam_systemd.c |
| 279 | @@ -28,6 +28,7 @@ |
| 280 | #include "hostname-util.h" |
| 281 | #include "login-util.h" |
| 282 | #include "macro.h" |
| 283 | +#include "missing.h" |
| 284 | #include "parse-util.h" |
| 285 | #include "path-util.h" |
| 286 | #include "process-util.h" |
| 287 | diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c |
| 288 | index 0b5af33566..9c808cd014 100644 |
| 289 | --- a/src/network/generator/network-generator.c |
| 290 | +++ b/src/network/generator/network-generator.c |
| 291 | @@ -13,6 +13,7 @@ |
| 292 | #include "string-table.h" |
| 293 | #include "string-util.h" |
| 294 | #include "strv.h" |
| 295 | +#include "missing.h" |
| 296 | |
| 297 | /* |
| 298 | # .network |
| 299 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c |
| 300 | index 3a99736813..279fea4d88 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 301 | --- a/src/nspawn/nspawn-settings.c |
| 302 | +++ b/src/nspawn/nspawn-settings.c |
| 303 | @@ -16,6 +16,7 @@ |
| 304 | #include "strv.h" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 305 | #include "user-util.h" |
| 306 | #include "util.h" |
| 307 | +#include "missing.h" |
| 308 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 309 | Settings *settings_new(void) { |
| 310 | Settings *s; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 311 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c |
| 312 | index f62ad0a0f5..f1a27e158d 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 313 | --- a/src/shared/dns-domain.c |
| 314 | +++ b/src/shared/dns-domain.c |
| 315 | @@ -24,6 +24,7 @@ |
| 316 | #include "string-util.h" |
| 317 | #include "strv.h" |
| 318 | #include "utf8.h" |
| 319 | +#include "missing.h" |
| 320 | |
| 321 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { |
| 322 | const char *n; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 323 | diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c |
| 324 | index 7c4fc7021d..a6ff2214df 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 325 | --- a/src/shared/journal-importer.c |
| 326 | +++ b/src/shared/journal-importer.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 327 | @@ -14,6 +14,7 @@ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 328 | #include "parse-util.h" |
| 329 | #include "string-util.h" |
| 330 | #include "unaligned.h" |
| 331 | +#include "missing.h" |
| 332 | |
| 333 | enum { |
| 334 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 335 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c |
| 336 | index b615c70dff..75b26e9c21 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 337 | --- a/src/shared/logs-show.c |
| 338 | +++ b/src/shared/logs-show.c |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 339 | @@ -39,6 +39,7 @@ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 340 | #include "time-util.h" |
| 341 | #include "utf8.h" |
| 342 | #include "util.h" |
| 343 | +#include "missing.h" |
| 344 | |
| 345 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ |
| 346 | #define PRINT_LINE_THRESHOLD 3 |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 347 | diff --git a/src/shared/pager.c b/src/shared/pager.c |
| 348 | index 7c20b100b4..e4209d3a95 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 349 | --- a/src/shared/pager.c |
| 350 | +++ b/src/shared/pager.c |
| 351 | @@ -25,6 +25,7 @@ |
| 352 | #include "strv.h" |
| 353 | #include "terminal-util.h" |
| 354 | #include "util.h" |
| 355 | +#include "missing.h" |
| 356 | |
| 357 | static pid_t pager_pid = 0; |
| 358 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 359 | diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c |
| 360 | index 6bf0ff0316..f6c8009cd2 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 361 | --- a/src/shared/path-lookup.c |
| 362 | +++ b/src/shared/path-lookup.c |
| 363 | @@ -20,6 +20,7 @@ |
| 364 | #include "tmpfile-util.h" |
| 365 | #include "user-util.h" |
| 366 | #include "util.h" |
| 367 | +#include "missing.h" |
| 368 | |
| 369 | int xdg_user_runtime_dir(char **ret, const char *suffix) { |
| 370 | const char *e; |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 371 | diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c |
| 372 | index 7cb7d8a477..8b12b91084 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 373 | --- a/src/shared/uid-range.c |
| 374 | +++ b/src/shared/uid-range.c |
| 375 | @@ -9,6 +9,7 @@ |
| 376 | #include "sort-util.h" |
| 377 | #include "uid-range.h" |
| 378 | #include "user-util.h" |
| 379 | +#include "missing.h" |
| 380 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 381 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { |
| 382 | assert(range); |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 383 | diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c |
| 384 | index abbbc9f2d6..6179b5851e 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 385 | --- a/src/socket-proxy/socket-proxyd.c |
| 386 | +++ b/src/socket-proxy/socket-proxyd.c |
| 387 | @@ -28,6 +28,7 @@ |
| 388 | #include "socket-util.h" |
| 389 | #include "string-util.h" |
| 390 | #include "util.h" |
| 391 | +#include "missing.h" |
| 392 | |
| 393 | #define BUFFER_SIZE (256 * 1024) |
| 394 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 395 | diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c |
| 396 | index 52217429b1..a05e7782f6 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 397 | --- a/src/test/test-hexdecoct.c |
| 398 | +++ b/src/test/test-hexdecoct.c |
| 399 | @@ -6,6 +6,7 @@ |
| 400 | #include "hexdecoct.h" |
| 401 | #include "macro.h" |
| 402 | #include "string-util.h" |
| 403 | +#include "missing.h" |
| 404 | |
| 405 | static void test_hexchar(void) { |
| 406 | assert_se(hexchar(0xa) == 'a'); |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 407 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c |
| 408 | index e8f1ce1354..8693cb02a4 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 409 | --- a/src/udev/udev-builtin-path_id.c |
| 410 | +++ b/src/udev/udev-builtin-path_id.c |
| 411 | @@ -23,6 +23,7 @@ |
| 412 | #include "strv.h" |
| 413 | #include "sysexits.h" |
| 414 | #include "udev-builtin.h" |
| 415 | +#include "missing.h" |
| 416 | |
| 417 | _printf_(2,3) |
| 418 | static void path_prepend(char **path, const char *fmt, ...) { |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 419 | diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c |
| 420 | index 8cfa2cdf23..b0670c77ec 100644 |
| 421 | --- a/src/udev/udev-event.c |
| 422 | +++ b/src/udev/udev-event.c |
| 423 | @@ -35,6 +35,7 @@ |
| 424 | #include "udev-util.h" |
| 425 | #include "udev-watch.h" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 426 | #include "user-util.h" |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 427 | +#include "missing.h" |
| 428 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 429 | typedef struct Spawn { |
| 430 | sd_device *device; |
| 431 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c |
| 432 | index 1642f10535..fe2aa75478 100644 |
| 433 | --- a/src/udev/udev-rules.c |
| 434 | +++ b/src/udev/udev-rules.c |
| 435 | @@ -28,6 +28,7 @@ |
| 436 | #include "udev-event.h" |
| 437 | #include "udev-rules.h" |
| 438 | #include "user-util.h" |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 439 | +#include "missing.h" |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame^] | 440 | |
| 441 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") |
| 442 | |