summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-07-27 13:13:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:47:00 +0100
commitd299cb3be9da6513484e3e79be4b20874baf1d38 (patch)
tree78c95c9da59d70c5e6ba165981f57ab00bb3e740 /meta/recipes-core
parent55681d09d7f519a1c7f17d17b18ec59bccdc91ca (diff)
downloadpoky-d299cb3be9da6513484e3e79be4b20874baf1d38.tar.gz
systemd: Fix build on musl
Latest upgrade to 249 broke a working build on musl, this is incremental fix to exisiting patches adapted to 249 release (From OE-Core rev: 06b69d0194b35010a09f0bb419d6fbabc9765a03) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch24
-rw-r--r--meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch173
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch147
-rw-r--r--meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch20
-rw-r--r--meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch14
-rw-r--r--meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch143
-rw-r--r--meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch18
7 files changed, 247 insertions, 292 deletions
diff --git a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
index 4cdf66e767..9db22cd9d2 100644
--- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
+++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -19,11 +19,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
19 src/shared/format-table.c | 36 ++++++++++++++++++++---------- 19 src/shared/format-table.c | 36 ++++++++++++++++++++----------
20 3 files changed, 38 insertions(+), 31 deletions(-) 20 3 files changed, 38 insertions(+), 31 deletions(-)
21 21
22diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
23index 49586a4a24..d92a5ab0ed 100644
24--- a/src/basic/sort-util.h 22--- a/src/basic/sort-util.h
25+++ b/src/basic/sort-util.h 23+++ b/src/basic/sort-util.h
26@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f 24@@ -56,18 +56,4 @@ static inline void _qsort_safe(void *bas
27 _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ 25 _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
28 }) 26 })
29 27
@@ -42,11 +40,9 @@ index 49586a4a24..d92a5ab0ed 100644
42- }) 40- })
43- 41-
44 int cmp_int(const int *a, const int *b); 42 int cmp_int(const int *a, const int *b);
45diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c 43--- a/src/shared/hwdb-util.c
46index fd45ff0f54..ac4b63c49b 100644 44+++ b/src/shared/hwdb-util.c
47--- a/src/libsystemd/sd-hwdb/hwdb-util.c 45@@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri
48+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
49@@ -126,9 +126,13 @@ static struct trie* trie_free(struct trie *trie) {
50 46
51 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); 47 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
52 48
@@ -63,7 +59,7 @@ index fd45ff0f54..ac4b63c49b 100644
63 } 59 }
64 60
65 static int trie_node_add_value(struct trie *trie, struct trie_node *node, 61 static int trie_node_add_value(struct trie *trie, struct trie_node *node,
66@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, 62@@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr
67 .value_off = v, 63 .value_off = v,
68 }; 64 };
69 65
@@ -75,7 +71,7 @@ index fd45ff0f54..ac4b63c49b 100644
75 if (val) { 71 if (val) {
76 /* At this point we have 2 identical properties on the same match-string. 72 /* At this point we have 2 identical properties on the same match-string.
77 * Since we process files in order, we just replace the previous value. */ 73 * Since we process files in order, we just replace the previous value. */
78@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, 74@@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr
79 .line_number = line_number, 75 .line_number = line_number,
80 }; 76 };
81 node->values_count++; 77 node->values_count++;
@@ -86,11 +82,9 @@ index fd45ff0f54..ac4b63c49b 100644
86 return 0; 82 return 0;
87 } 83 }
88 84
89diff --git a/src/shared/format-table.c b/src/shared/format-table.c
90index dccb796b26..c3ab8ac296 100644
91--- a/src/shared/format-table.c 85--- a/src/shared/format-table.c
92+++ b/src/shared/format-table.c 86+++ b/src/shared/format-table.c
93@@ -1290,30 +1290,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t 87@@ -1282,30 +1282,32 @@ static int cell_data_compare(TableData *
94 return CMP(index_a, index_b); 88 return CMP(index_a, index_b);
95 } 89 }
96 90
@@ -133,7 +127,7 @@ index dccb796b26..c3ab8ac296 100644
133 } 127 }
134 128
135 /* Order identical lines by the order there were originally added in */ 129 /* Order identical lines by the order there were originally added in */
136@@ -1952,7 +1954,12 @@ int table_print(Table *t, FILE *f) { 130@@ -1944,7 +1946,12 @@ int table_print(Table *t, FILE *f) {
137 for (size_t i = 0; i < n_rows; i++) 131 for (size_t i = 0; i < n_rows; i++)
138 sorted[i] = i * t->n_columns; 132 sorted[i] = i * t->n_columns;
139 133
@@ -147,7 +141,7 @@ index dccb796b26..c3ab8ac296 100644
147 } 141 }
148 142
149 if (t->display_map) 143 if (t->display_map)
150@@ -2580,7 +2587,12 @@ int table_to_json(Table *t, JsonVariant **ret) { 144@@ -2572,7 +2579,12 @@ int table_to_json(Table *t, JsonVariant
151 for (size_t i = 0; i < n_rows; i++) 145 for (size_t i = 0; i < n_rows; i++)
152 sorted[i] = i * t->n_columns; 146 sorted[i] = i * t->n_columns;
153 147
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 814c28f5b9..c863fc995c 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
@@ -74,14 +74,14 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
74 74
75--- a/meson.build 75--- a/meson.build
76+++ b/meson.build 76+++ b/meson.build
77@@ -550,6 +550,7 @@ foreach ident : [ 77@@ -480,6 +480,7 @@ foreach ident : ['secure_getenv', '__sec
78 ['execveat', '''#include <unistd.h>'''], 78 endforeach
79 ['close_range', '''#include <unistd.h>'''], 79
80 ['epoll_pwait2', '''#include <sys/epoll.h>'''], 80 foreach ident : [
81+ ['strndupa' , '''#include <string.h>'''], 81+ ['strndupa' , '''#include <string.h>'''],
82 ] 82 ['memfd_create', '''#include <sys/mman.h>'''],
83 83 ['gettid', '''#include <sys/types.h>
84 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') 84 #include <unistd.h>'''],
85--- a/src/backlight/backlight.c 85--- a/src/backlight/backlight.c
86+++ b/src/backlight/backlight.c 86+++ b/src/backlight/backlight.c
87@@ -19,6 +19,7 @@ 87@@ -19,6 +19,7 @@
@@ -89,7 +89,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
89 #include "strv.h" 89 #include "strv.h"
90 #include "util.h" 90 #include "util.h"
91+#include "missing_stdlib.h" 91+#include "missing_stdlib.h"
92 92
93 static int help(void) { 93 static int help(void) {
94 _cleanup_free_ char *link = NULL; 94 _cleanup_free_ char *link = NULL;
95--- a/src/basic/cgroup-util.c 95--- a/src/basic/cgroup-util.c
@@ -99,7 +99,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
99 #include "user-util.h" 99 #include "user-util.h"
100 #include "xattr-util.h" 100 #include "xattr-util.h"
101+#include "missing_stdlib.h" 101+#include "missing_stdlib.h"
102 102
103 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) {
104 _cleanup_free_ char *fs = NULL; 104 _cleanup_free_ char *fs = NULL;
105--- a/src/basic/env-util.c 105--- a/src/basic/env-util.c
@@ -109,7 +109,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
109 #include "strv.h" 109 #include "strv.h"
110 #include "utf8.h" 110 #include "utf8.h"
111+#include "missing_stdlib.h" 111+#include "missing_stdlib.h"
112 112
113 /* 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. */
114 #define VALID_BASH_ENV_NAME_CHARS \ 114 #define VALID_BASH_ENV_NAME_CHARS \
115--- a/src/basic/log.c 115--- a/src/basic/log.c
@@ -119,9 +119,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
119 #include "time-util.h" 119 #include "time-util.h"
120 #include "utf8.h" 120 #include "utf8.h"
121+#include "missing_stdlib.h" 121+#include "missing_stdlib.h"
122 122
123 #define SNDBUF_SIZE (8*1024*1024) 123 #define SNDBUF_SIZE (8*1024*1024)
124 124
125--- a/src/basic/missing_stdlib.h 125--- a/src/basic/missing_stdlib.h
126+++ b/src/basic/missing_stdlib.h 126+++ b/src/basic/missing_stdlib.h
127@@ -11,3 +11,15 @@ 127@@ -11,3 +11,15 @@
@@ -147,12 +147,12 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
147 #include "stdio-util.h" 147 #include "stdio-util.h"
148 #include "user-util.h" 148 #include "user-util.h"
149+#include "missing_stdlib.h" 149+#include "missing_stdlib.h"
150 150
151 int mkdir_safe_internal( 151 int mkdir_safe_internal(
152 const char *path, 152 const char *path,
153--- a/src/basic/mountpoint-util.c 153--- a/src/basic/mountpoint-util.c
154+++ b/src/basic/mountpoint-util.c 154+++ b/src/basic/mountpoint-util.c
155@@ -12,6 +12,7 @@ 155@@ -11,6 +11,7 @@
156 #include "missing_stat.h" 156 #include "missing_stat.h"
157 #include "missing_syscall.h" 157 #include "missing_syscall.h"
158 #include "mkdir.h" 158 #include "mkdir.h"
@@ -167,7 +167,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
167 #include "string-util.h" 167 #include "string-util.h"
168 #include "strv.h" 168 #include "strv.h"
169+#include "missing_stdlib.h" 169+#include "missing_stdlib.h"
170 170
171 int parse_boolean(const char *v) { 171 int parse_boolean(const char *v) {
172 if (!v) 172 if (!v)
173--- a/src/basic/path-lookup.c 173--- a/src/basic/path-lookup.c
@@ -177,7 +177,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
177 #include "tmpfile-util.h" 177 #include "tmpfile-util.h"
178 #include "user-util.h" 178 #include "user-util.h"
179+#include "missing_stdlib.h" 179+#include "missing_stdlib.h"
180 180
181 int xdg_user_runtime_dir(char **ret, const char *suffix) { 181 int xdg_user_runtime_dir(char **ret, const char *suffix) {
182 const char *e; 182 const char *e;
183--- a/src/basic/proc-cmdline.c 183--- a/src/basic/proc-cmdline.c
@@ -187,7 +187,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
187 #include "util.h" 187 #include "util.h"
188 #include "virt.h" 188 #include "virt.h"
189+#include "missing_stdlib.h" 189+#include "missing_stdlib.h"
190 190
191 int proc_cmdline(char **ret) { 191 int proc_cmdline(char **ret) {
192 const char *e; 192 const char *e;
193--- a/src/basic/procfs-util.c 193--- a/src/basic/procfs-util.c
@@ -197,29 +197,19 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
197 #include "stdio-util.h" 197 #include "stdio-util.h"
198 #include "string-util.h" 198 #include "string-util.h"
199+#include "missing_stdlib.h" 199+#include "missing_stdlib.h"
200 200
201 int procfs_tasks_get_limit(uint64_t *ret) { 201 int procfs_tasks_get_limit(uint64_t *ret) {
202 _cleanup_free_ char *value = NULL; 202 _cleanup_free_ char *value = NULL;
203--- a/src/basic/selinux-util.c
204+++ b/src/basic/selinux-util.c
205@@ -27,6 +27,7 @@
206 #include "selinux-util.h"
207 #include "stdio-util.h"
208 #include "time-util.h"
209+#include "missing_stdlib.h"
210
211 #if HAVE_SELINUX
212 DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(context_t, context_free, NULL);
213--- a/src/basic/time-util.c 203--- a/src/basic/time-util.c
214+++ b/src/basic/time-util.c 204+++ b/src/basic/time-util.c
215@@ -27,6 +27,7 @@ 205@@ -26,6 +26,7 @@
216 #include "string-util.h" 206 #include "string-util.h"
217 #include "strv.h" 207 #include "strv.h"
218 #include "time-util.h" 208 #include "time-util.h"
219+#include "missing_stdlib.h" 209+#include "missing_stdlib.h"
220 210
221 static clockid_t map_clock_id(clockid_t c) { 211 static clockid_t map_clock_id(clockid_t c) {
222 212
223--- a/src/boot/bless-boot.c 213--- a/src/boot/bless-boot.c
224+++ b/src/boot/bless-boot.c 214+++ b/src/boot/bless-boot.c
225@@ -18,6 +18,7 @@ 215@@ -18,6 +18,7 @@
@@ -227,27 +217,27 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
227 #include "verbs.h" 217 #include "verbs.h"
228 #include "virt.h" 218 #include "virt.h"
229+#include "missing_stdlib.h" 219+#include "missing_stdlib.h"
230 220
231 static char **arg_path = NULL; 221 static char **arg_path = NULL;
232 222
233--- a/src/core/dbus-cgroup.c 223--- a/src/core/dbus-cgroup.c
234+++ b/src/core/dbus-cgroup.c 224+++ b/src/core/dbus-cgroup.c
235@@ -17,6 +17,7 @@ 225@@ -20,6 +20,7 @@
236 #include "limits-util.h" 226 #include "parse-util.h"
237 #include "path-util.h" 227 #include "path-util.h"
238 #include "percent-util.h" 228 #include "percent-util.h"
239+#include "missing_stdlib.h" 229+#include "missing_stdlib.h"
240 230
241 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); 231 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
242 232
243--- a/src/core/dbus-execute.c 233--- a/src/core/dbus-execute.c
244+++ b/src/core/dbus-execute.c 234+++ b/src/core/dbus-execute.c
245@@ -41,6 +41,7 @@ 235@@ -42,6 +42,7 @@
246 #include "unit-printf.h" 236 #include "unit-printf.h"
247 #include "user-util.h" 237 #include "user-util.h"
248 #include "utf8.h" 238 #include "utf8.h"
249+#include "missing_stdlib.h" 239+#include "missing_stdlib.h"
250 240
251 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);
252 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);
253--- a/src/core/dbus-util.c 243--- a/src/core/dbus-util.c
@@ -257,17 +247,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
257 #include "user-util.h" 247 #include "user-util.h"
258 #include "unit.h" 248 #include "unit.h"
259+#include "missing_stdlib.h" 249+#include "missing_stdlib.h"
260 250
261 int bus_property_get_triggered_unit( 251 int bus_property_get_triggered_unit(
262 sd_bus *bus, 252 sd_bus *bus,
263--- a/src/core/execute.c 253--- a/src/core/execute.c
264+++ b/src/core/execute.c 254+++ b/src/core/execute.c
265@@ -96,6 +96,7 @@ 255@@ -98,6 +98,7 @@
266 #include "unit-serialize.h" 256 #include "unit-serialize.h"
267 #include "user-util.h" 257 #include "user-util.h"
268 #include "utmp-wtmp.h" 258 #include "utmp-wtmp.h"
269+#include "missing_stdlib.h" 259+#include "missing_stdlib.h"
270 260
271 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) 261 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
272 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) 262 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
273--- a/src/core/kmod-setup.c 263--- a/src/core/kmod-setup.c
@@ -277,7 +267,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
277 #include "string-util.h" 267 #include "string-util.h"
278 #include "missing_type.h" 268 #include "missing_type.h"
279+#include "missing_stdlib.h" 269+#include "missing_stdlib.h"
280 270
281 #if HAVE_KMOD 271 #if HAVE_KMOD
282 #include "module-util.h" 272 #include "module-util.h"
283--- a/src/core/service.c 273--- a/src/core/service.c
@@ -287,7 +277,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
287 #include "utf8.h" 277 #include "utf8.h"
288 #include "util.h" 278 #include "util.h"
289+#include "missing_stdlib.h" 279+#include "missing_stdlib.h"
290 280
291 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { 281 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
292 [SERVICE_DEAD] = UNIT_INACTIVE, 282 [SERVICE_DEAD] = UNIT_INACTIVE,
293--- a/src/coredump/coredump-vacuum.c 283--- a/src/coredump/coredump-vacuum.c
@@ -297,7 +287,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
297 #include "time-util.h" 287 #include "time-util.h"
298 #include "user-util.h" 288 #include "user-util.h"
299+#include "missing_stdlib.h" 289+#include "missing_stdlib.h"
300 290
301 #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 */
302 #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 */
303--- a/src/journal-remote/journal-remote-main.c 293--- a/src/journal-remote/journal-remote-main.c
@@ -307,7 +297,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
307 #include "string-table.h" 297 #include "string-table.h"
308 #include "strv.h" 298 #include "strv.h"
309+#include "missing_stdlib.h" 299+#include "missing_stdlib.h"
310 300
311 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" 301 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
312 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" 302 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
313--- a/src/journal/journalctl.c 303--- a/src/journal/journalctl.c
@@ -317,7 +307,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
317 #include "user-util.h" 307 #include "user-util.h"
318 #include "varlink.h" 308 #include "varlink.h"
319+#include "missing_stdlib.h" 309+#include "missing_stdlib.h"
320 310
321 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) 311 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
322 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ 312 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */
323--- a/src/libsystemd/sd-bus/bus-message.c 313--- a/src/libsystemd/sd-bus/bus-message.c
@@ -327,9 +317,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
327 #include "time-util.h" 317 #include "time-util.h"
328 #include "utf8.h" 318 #include "utf8.h"
329+#include "missing_stdlib.h" 319+#include "missing_stdlib.h"
330 320
331 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);
332 322
333--- a/src/libsystemd/sd-bus/bus-objects.c 323--- a/src/libsystemd/sd-bus/bus-objects.c
334+++ b/src/libsystemd/sd-bus/bus-objects.c 324+++ b/src/libsystemd/sd-bus/bus-objects.c
335@@ -12,6 +12,7 @@ 325@@ -12,6 +12,7 @@
@@ -337,27 +327,27 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
337 #include "string-util.h" 327 #include "string-util.h"
338 #include "strv.h" 328 #include "strv.h"
339+#include "missing_stdlib.h" 329+#include "missing_stdlib.h"
340 330
341 static int node_vtable_get_userdata( 331 static int node_vtable_get_userdata(
342 sd_bus *bus, 332 sd_bus *bus,
343--- a/src/libsystemd/sd-bus/bus-socket.c 333--- a/src/libsystemd/sd-bus/bus-socket.c
344+++ b/src/libsystemd/sd-bus/bus-socket.c 334+++ b/src/libsystemd/sd-bus/bus-socket.c
345@@ -28,6 +28,7 @@ 335@@ -27,6 +27,7 @@
346 #include "string-util.h" 336 #include "string-util.h"
347 #include "user-util.h" 337 #include "user-util.h"
348 #include "utf8.h" 338 #include "utf8.h"
349+#include "missing_stdlib.h" 339+#include "missing_stdlib.h"
350 340
351 #define SNDBUF_SIZE (8*1024*1024) 341 #define SNDBUF_SIZE (8*1024*1024)
352 342
353--- a/src/libsystemd/sd-bus/sd-bus.c 343--- a/src/libsystemd/sd-bus/sd-bus.c
354+++ b/src/libsystemd/sd-bus/sd-bus.c 344+++ b/src/libsystemd/sd-bus/sd-bus.c
355@@ -41,6 +41,7 @@ 345@@ -42,6 +42,7 @@
356 #include "string-util.h" 346 #include "string-util.h"
357 #include "strv.h" 347 #include "strv.h"
358 #include "user-util.h" 348 #include "user-util.h"
359+#include "missing_stdlib.h" 349+#include "missing_stdlib.h"
360 350
361 #define log_debug_bus_message(m) \ 351 #define log_debug_bus_message(m) \
362 do { \ 352 do { \
363--- a/src/libsystemd/sd-bus/test-bus-benchmark.c 353--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
@@ -367,9 +357,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
367 #include "time-util.h" 357 #include "time-util.h"
368 #include "util.h" 358 #include "util.h"
369+#include "missing_stdlib.h" 359+#include "missing_stdlib.h"
370 360
371 #define MAX_SIZE (2*1024*1024) 361 #define MAX_SIZE (2*1024*1024)
372 362
373--- a/src/libsystemd/sd-journal/sd-journal.c 363--- a/src/libsystemd/sd-journal/sd-journal.c
374+++ b/src/libsystemd/sd-journal/sd-journal.c 364+++ b/src/libsystemd/sd-journal/sd-journal.c
375@@ -40,6 +40,7 @@ 365@@ -40,6 +40,7 @@
@@ -377,9 +367,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
377 #include "strv.h" 367 #include "strv.h"
378 #include "syslog-util.h" 368 #include "syslog-util.h"
379+#include "missing_stdlib.h" 369+#include "missing_stdlib.h"
380 370
381 #define JOURNAL_FILES_MAX 7168 371 #define JOURNAL_FILES_MAX 7168
382 372
383--- a/src/locale/keymap-util.c 373--- a/src/locale/keymap-util.c
384+++ b/src/locale/keymap-util.c 374+++ b/src/locale/keymap-util.c
385@@ -24,6 +24,7 @@ 375@@ -24,6 +24,7 @@
@@ -387,7 +377,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
387 #include "strv.h" 377 #include "strv.h"
388 #include "tmpfile-util.h" 378 #include "tmpfile-util.h"
389+#include "missing_stdlib.h" 379+#include "missing_stdlib.h"
390 380
391 static bool startswith_comma(const char *s, const char *prefix) { 381 static bool startswith_comma(const char *s, const char *prefix) {
392 s = startswith(s, prefix); 382 s = startswith(s, prefix);
393--- a/src/login/pam_systemd.c 383--- a/src/login/pam_systemd.c
@@ -407,17 +397,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
407 #include "string-util.h" 397 #include "string-util.h"
408 #include "strv.h" 398 #include "strv.h"
409+#include "missing_stdlib.h" 399+#include "missing_stdlib.h"
410 400
411 /* 401 /*
412 # .network 402 # .network
413--- a/src/nspawn/nspawn-settings.c 403--- a/src/nspawn/nspawn-settings.c
414+++ b/src/nspawn/nspawn-settings.c 404+++ b/src/nspawn/nspawn-settings.c
415@@ -16,6 +16,7 @@ 405@@ -17,6 +17,7 @@
416 #include "strv.h" 406 #include "strv.h"
417 #include "user-util.h" 407 #include "user-util.h"
418 #include "util.h" 408 #include "util.h"
419+#include "missing_stdlib.h" 409+#include "missing_stdlib.h"
420 410
421 Settings *settings_new(void) { 411 Settings *settings_new(void) {
422 Settings *s; 412 Settings *s;
423--- a/src/nss-mymachines/nss-mymachines.c 413--- a/src/nss-mymachines/nss-mymachines.c
@@ -427,19 +417,19 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
427 #include "signal-util.h" 417 #include "signal-util.h"
428 #include "string-util.h" 418 #include "string-util.h"
429+#include "missing_stdlib.h" 419+#include "missing_stdlib.h"
430 420
431 static void setup_logging(void) { 421 static void setup_logging(void) {
432 /* We need a dummy function because log_parse_environment is a macro. */ 422 /* We need a dummy function because log_parse_environment is a macro. */
433--- a/src/portable/portable.c 423--- a/src/portable/portable.c
434+++ b/src/portable/portable.c 424+++ b/src/portable/portable.c
435@@ -32,6 +32,7 @@ 425@@ -34,6 +34,7 @@
436 #include "strv.h" 426 #include "strv.h"
437 #include "tmpfile-util.h" 427 #include "tmpfile-util.h"
438 #include "user-util.h" 428 #include "user-util.h"
439+#include "missing_stdlib.h" 429+#include "missing_stdlib.h"
440 430
441 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile"); 431 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
442 432
443--- a/src/resolve/resolvectl.c 433--- a/src/resolve/resolvectl.c
444+++ b/src/resolve/resolvectl.c 434+++ b/src/resolve/resolvectl.c
445@@ -41,6 +41,7 @@ 435@@ -41,6 +41,7 @@
@@ -447,7 +437,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
447 #include "utf8.h" 437 #include "utf8.h"
448 #include "verbs.h" 438 #include "verbs.h"
449+#include "missing_stdlib.h" 439+#include "missing_stdlib.h"
450 440
451 static int arg_family = AF_UNSPEC; 441 static int arg_family = AF_UNSPEC;
452 static int arg_ifindex = 0; 442 static int arg_ifindex = 0;
453--- a/src/shared/bus-get-properties.c 443--- a/src/shared/bus-get-properties.c
@@ -457,7 +447,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
457 #include "stdio-util.h" 447 #include "stdio-util.h"
458 #include "string-util.h" 448 #include "string-util.h"
459+#include "missing_stdlib.h" 449+#include "missing_stdlib.h"
460 450
461 int bus_property_get_bool( 451 int bus_property_get_bool(
462 sd_bus *bus, 452 sd_bus *bus,
463--- a/src/shared/bus-unit-procs.c 453--- a/src/shared/bus-unit-procs.c
@@ -467,17 +457,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
467 #include "string-util.h" 457 #include "string-util.h"
468 #include "terminal-util.h" 458 #include "terminal-util.h"
469+#include "missing_stdlib.h" 459+#include "missing_stdlib.h"
470 460
471 struct CGroupInfo { 461 struct CGroupInfo {
472 char *cgroup_path; 462 char *cgroup_path;
473--- a/src/shared/bus-unit-util.c 463--- a/src/shared/bus-unit-util.c
474+++ b/src/shared/bus-unit-util.c 464+++ b/src/shared/bus-unit-util.c
475@@ -45,6 +45,7 @@ 465@@ -47,6 +47,7 @@
476 #include "unit-def.h" 466 #include "unit-def.h"
477 #include "user-util.h" 467 #include "user-util.h"
478 #include "utf8.h" 468 #include "utf8.h"
479+#include "missing_stdlib.h" 469+#include "missing_stdlib.h"
480 470
481 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { 471 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
482 assert(message); 472 assert(message);
483--- a/src/shared/bus-util.c 473--- a/src/shared/bus-util.c
@@ -487,7 +477,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
487 #include "socket-util.h" 477 #include "socket-util.h"
488 #include "stdio-util.h" 478 #include "stdio-util.h"
489+#include "missing_stdlib.h" 479+#include "missing_stdlib.h"
490 480
491 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) {
492 sd_event *e = userdata; 482 sd_event *e = userdata;
493--- a/src/shared/dns-domain.c 483--- a/src/shared/dns-domain.c
@@ -497,17 +487,17 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
497 #include "strv.h" 487 #include "strv.h"
498 #include "utf8.h" 488 #include "utf8.h"
499+#include "missing_stdlib.h" 489+#include "missing_stdlib.h"
500 490
501 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) {
502 const char *n; 492 const char *n;
503--- a/src/shared/journal-importer.c 493--- a/src/shared/journal-importer.c
504+++ b/src/shared/journal-importer.c 494+++ b/src/shared/journal-importer.c
505@@ -14,6 +14,7 @@ 495@@ -15,6 +15,7 @@
506 #include "parse-util.h" 496 #include "parse-util.h"
507 #include "string-util.h" 497 #include "string-util.h"
508 #include "unaligned.h" 498 #include "unaligned.h"
509+#include "missing_stdlib.h" 499+#include "missing_stdlib.h"
510 500
511 enum { 501 enum {
512 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ 502 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
513--- a/src/shared/logs-show.c 503--- a/src/shared/logs-show.c
@@ -517,7 +507,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
517 #include "util.h" 507 #include "util.h"
518 #include "web-util.h" 508 #include "web-util.h"
519+#include "missing_stdlib.h" 509+#include "missing_stdlib.h"
520 510
521 /* 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 */
522 #define PRINT_LINE_THRESHOLD 3 512 #define PRINT_LINE_THRESHOLD 3
523--- a/src/shared/pager.c 513--- a/src/shared/pager.c
@@ -527,9 +517,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
527 #include "terminal-util.h" 517 #include "terminal-util.h"
528 #include "util.h" 518 #include "util.h"
529+#include "missing_stdlib.h" 519+#include "missing_stdlib.h"
530 520
531 static pid_t pager_pid = 0; 521 static pid_t pager_pid = 0;
532 522
533--- a/src/shared/uid-range.c 523--- a/src/shared/uid-range.c
534+++ b/src/shared/uid-range.c 524+++ b/src/shared/uid-range.c
535@@ -9,6 +9,7 @@ 525@@ -9,6 +9,7 @@
@@ -537,7 +527,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
537 #include "uid-range.h" 527 #include "uid-range.h"
538 #include "user-util.h" 528 #include "user-util.h"
539+#include "missing_stdlib.h" 529+#include "missing_stdlib.h"
540 530
541 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) {
542 assert(range); 532 assert(range);
543--- a/src/socket-proxy/socket-proxyd.c 533--- a/src/socket-proxy/socket-proxyd.c
@@ -547,9 +537,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
547 #include "string-util.h" 537 #include "string-util.h"
548 #include "util.h" 538 #include "util.h"
549+#include "missing_stdlib.h" 539+#include "missing_stdlib.h"
550 540
551 #define BUFFER_SIZE (256 * 1024) 541 #define BUFFER_SIZE (256 * 1024)
552 542
553--- a/src/test/test-hexdecoct.c 543--- a/src/test/test-hexdecoct.c
554+++ b/src/test/test-hexdecoct.c 544+++ b/src/test/test-hexdecoct.c
555@@ -6,6 +6,7 @@ 545@@ -6,6 +6,7 @@
@@ -557,7 +547,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
557 #include "macro.h" 547 #include "macro.h"
558 #include "string-util.h" 548 #include "string-util.h"
559+#include "missing_stdlib.h" 549+#include "missing_stdlib.h"
560 550
561 static void test_hexchar(void) { 551 static void test_hexchar(void) {
562 assert_se(hexchar(0xa) == 'a'); 552 assert_se(hexchar(0xa) == 'a');
563--- a/src/udev/udev-builtin-path_id.c 553--- a/src/udev/udev-builtin-path_id.c
@@ -567,29 +557,29 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
567 #include "udev-builtin.h" 557 #include "udev-builtin.h"
568 #include "udev-util.h" 558 #include "udev-util.h"
569+#include "missing_stdlib.h" 559+#include "missing_stdlib.h"
570 560
571 _printf_(2,3) 561 _printf_(2,3)
572 static void path_prepend(char **path, const char *fmt, ...) { 562 static void path_prepend(char **path, const char *fmt, ...) {
573--- a/src/udev/udev-event.c 563--- a/src/udev/udev-event.c
574+++ b/src/udev/udev-event.c 564+++ b/src/udev/udev-event.c
575@@ -33,6 +33,7 @@ 565@@ -34,6 +34,7 @@
576 #include "udev-util.h" 566 #include "udev-util.h"
577 #include "udev-watch.h" 567 #include "udev-watch.h"
578 #include "user-util.h" 568 #include "user-util.h"
579+#include "missing_stdlib.h" 569+#include "missing_stdlib.h"
580 570
581 typedef struct Spawn { 571 typedef struct Spawn {
582 sd_device *device; 572 sd_device *device;
583--- a/src/udev/udev-rules.c 573--- a/src/udev/udev-rules.c
584+++ b/src/udev/udev-rules.c 574+++ b/src/udev/udev-rules.c
585@@ -31,6 +31,7 @@ 575@@ -33,6 +33,7 @@
586 #include "udev-rules.h" 576 #include "udev-util.h"
587 #include "user-util.h" 577 #include "user-util.h"
588 #include "virt.h" 578 #include "virt.h"
589+#include "missing_stdlib.h" 579+#include "missing_stdlib.h"
590 580
591 #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")
592 582
593--- a/src/basic/percent-util.c 583--- a/src/basic/percent-util.c
594+++ b/src/basic/percent-util.c 584+++ b/src/basic/percent-util.c
595@@ -3,6 +3,7 @@ 585@@ -3,6 +3,7 @@
@@ -597,6 +587,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
597 #include "string-util.h" 587 #include "string-util.h"
598 #include "parse-util.h" 588 #include "parse-util.h"
599+#include "missing_stdlib.h" 589+#include "missing_stdlib.h"
600 590
601 static int parse_parts_value_whole(const char *p, const char *symbol) { 591 static int parse_parts_value_whole(const char *p, const char *symbol) {
602 const char *pc, *n; 592 const char *pc, *n;
593
diff --git a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
index 54d714266e..2dfc7a3cfb 100644
--- a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
+++ b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch
@@ -56,8 +56,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
56 src/udev/udev-builtin-net_setup_link.c | 1 + 56 src/udev/udev-builtin-net_setup_link.c | 1 +
57 21 files changed, 26 insertions(+), 8 deletions(-) 57 21 files changed, 26 insertions(+), 8 deletions(-)
58 58
59diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
60index 410bfda10e..e70ed8be92 100644
61--- a/src/libsystemd-network/sd-dhcp6-client.c 59--- a/src/libsystemd-network/sd-dhcp6-client.c
62+++ b/src/libsystemd-network/sd-dhcp6-client.c 60+++ b/src/libsystemd-network/sd-dhcp6-client.c
63@@ -5,7 +5,6 @@ 61@@ -5,7 +5,6 @@
@@ -68,8 +66,6 @@ index 410bfda10e..e70ed8be92 100644
68 #include <linux/if_infiniband.h> 66 #include <linux/if_infiniband.h>
69 67
70 #include "sd-dhcp6-client.h" 68 #include "sd-dhcp6-client.h"
71diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
72index ed7b9a8cd1..112c0b09e4 100644
73--- a/src/libsystemd/sd-netlink/netlink-types.c 69--- a/src/libsystemd/sd-netlink/netlink-types.c
74+++ b/src/libsystemd/sd-netlink/netlink-types.c 70+++ b/src/libsystemd/sd-netlink/netlink-types.c
75@@ -3,6 +3,7 @@ 71@@ -3,6 +3,7 @@
@@ -80,8 +76,6 @@ index ed7b9a8cd1..112c0b09e4 100644
80 #include <linux/can/vxcan.h> 76 #include <linux/can/vxcan.h>
81 #include <linux/netlink.h> 77 #include <linux/netlink.h>
82 #include <linux/rtnetlink.h> 78 #include <linux/rtnetlink.h>
83diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
84index e7c4ed3c7c..3a1e4f9072 100644
85--- a/src/machine/machine-dbus.c 79--- a/src/machine/machine-dbus.c
86+++ b/src/machine/machine-dbus.c 80+++ b/src/machine/machine-dbus.c
87@@ -3,6 +3,7 @@ 81@@ -3,6 +3,7 @@
@@ -92,8 +86,6 @@ index e7c4ed3c7c..3a1e4f9072 100644
92 86
93 /* When we include libgen.h because we need dirname() we immediately 87 /* When we include libgen.h because we need dirname() we immediately
94 * undefine basename() since libgen.h defines it as a macro to the POSIX 88 * undefine basename() since libgen.h defines it as a macro to the POSIX
95diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
96index cf7ca88d6f..34ab468191 100644
97--- a/src/network/netdev/bond.c 89--- a/src/network/netdev/bond.c
98+++ b/src/network/netdev/bond.c 90+++ b/src/network/netdev/bond.c
99@@ -1,5 +1,6 @@ 91@@ -1,5 +1,6 @@
@@ -103,8 +95,6 @@ index cf7ca88d6f..34ab468191 100644
103 #include "alloc-util.h" 95 #include "alloc-util.h"
104 #include "bond.h" 96 #include "bond.h"
105 #include "bond-util.h" 97 #include "bond-util.h"
106diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
107index 38432f1578..79ccfe578e 100644
108--- a/src/network/netdev/bridge.c 98--- a/src/network/netdev/bridge.c
109+++ b/src/network/netdev/bridge.c 99+++ b/src/network/netdev/bridge.c
110@@ -1,5 +1,6 @@ 100@@ -1,5 +1,6 @@
@@ -114,8 +104,6 @@ index 38432f1578..79ccfe578e 100644
114 #include <net/if.h> 104 #include <net/if.h>
115 105
116 #include "bridge.h" 106 #include "bridge.h"
117diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
118index 77c5f8c4e7..04be1b4ab2 100644
119--- a/src/network/netdev/macsec.c 107--- a/src/network/netdev/macsec.c
120+++ b/src/network/netdev/macsec.c 108+++ b/src/network/netdev/macsec.c
121@@ -1,5 +1,6 @@ 109@@ -1,5 +1,6 @@
@@ -125,8 +113,6 @@ index 77c5f8c4e7..04be1b4ab2 100644
125 #include <netinet/in.h> 113 #include <netinet/in.h>
126 #include <linux/if_ether.h> 114 #include <linux/if_ether.h>
127 #include <linux/if_macsec.h> 115 #include <linux/if_macsec.h>
128diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
129index 8abe044890..3c54c58928 100644
130--- a/src/network/netdev/netdev-gperf.gperf 116--- a/src/network/netdev/netdev-gperf.gperf
131+++ b/src/network/netdev/netdev-gperf.gperf 117+++ b/src/network/netdev/netdev-gperf.gperf
132@@ -3,6 +3,7 @@ 118@@ -3,6 +3,7 @@
@@ -137,8 +123,6 @@ index 8abe044890..3c54c58928 100644
137 #include <stddef.h> 123 #include <stddef.h>
138 #include "bareudp.h" 124 #include "bareudp.h"
139 #include "batadv.h" 125 #include "batadv.h"
140diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
141index b31f0fa81a..c80e1ff537 100644
142--- a/src/network/netdev/netdev.c 126--- a/src/network/netdev/netdev.c
143+++ b/src/network/netdev/netdev.c 127+++ b/src/network/netdev/netdev.c
144@@ -1,5 +1,6 @@ 128@@ -1,5 +1,6 @@
@@ -148,20 +132,6 @@ index b31f0fa81a..c80e1ff537 100644
148 #include <net/if.h> 132 #include <net/if.h>
149 #include <netinet/in.h> 133 #include <netinet/in.h>
150 #include <unistd.h> 134 #include <unistd.h>
151diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
152index 2847b336c9..4d6af8c642 100644
153--- a/src/network/networkd-brvlan.c
154+++ b/src/network/networkd-brvlan.c
155@@ -4,6 +4,7 @@
156 ***/
157
158 #include <netinet/in.h>
159+#include <netinet/if_ether.h>
160 #include <linux/if_bridge.h>
161 #include <stdbool.h>
162
163diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
164index 00d055cf8d..65821c1d31 100644
165--- a/src/network/networkd-dhcp-common.c 135--- a/src/network/networkd-dhcp-common.c
166+++ b/src/network/networkd-dhcp-common.c 136+++ b/src/network/networkd-dhcp-common.c
167@@ -1,7 +1,8 @@ 137@@ -1,7 +1,8 @@
@@ -173,8 +143,8 @@ index 00d055cf8d..65821c1d31 100644
173+#include <net/if.h> 143+#include <net/if.h>
174 144
175 #include "bus-error.h" 145 #include "bus-error.h"
176 #include "dhcp-internal.h" 146 #include "dhcp-identifier.h"
177@@ -11,6 +12,7 @@ 147@@ -13,6 +14,7 @@
178 #include "networkd-dhcp-common.h" 148 #include "networkd-dhcp-common.h"
179 #include "networkd-link.h" 149 #include "networkd-link.h"
180 #include "networkd-manager.h" 150 #include "networkd-manager.h"
@@ -182,8 +152,6 @@ index 00d055cf8d..65821c1d31 100644
182 #include "networkd-network.h" 152 #include "networkd-network.h"
183 #include "parse-util.h" 153 #include "parse-util.h"
184 #include "socket-util.h" 154 #include "socket-util.h"
185diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
186index 5cdf432c27..93cffb9863 100644
187--- a/src/network/networkd-dhcp-server.c 155--- a/src/network/networkd-dhcp-server.c
188+++ b/src/network/networkd-dhcp-server.c 156+++ b/src/network/networkd-dhcp-server.c
189@@ -1,8 +1,8 @@ 157@@ -1,8 +1,8 @@
@@ -197,8 +165,6 @@ index 5cdf432c27..93cffb9863 100644
197 165
198 #include "sd-dhcp-server.h" 166 #include "sd-dhcp-server.h"
199 167
200diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
201index 23dc3a45db..7ae6c2467a 100644
202--- a/src/network/networkd-dhcp4.c 168--- a/src/network/networkd-dhcp4.c
203+++ b/src/network/networkd-dhcp4.c 169+++ b/src/network/networkd-dhcp4.c
204@@ -1,9 +1,9 @@ 170@@ -1,9 +1,9 @@
@@ -212,8 +178,6 @@ index 23dc3a45db..7ae6c2467a 100644
212 178
213 #include "escape.h" 179 #include "escape.h"
214 #include "alloc-util.h" 180 #include "alloc-util.h"
215diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
216index aa077d6219..4f6ce22059 100644
217--- a/src/network/networkd-dhcp6.c 181--- a/src/network/networkd-dhcp6.c
218+++ b/src/network/networkd-dhcp6.c 182+++ b/src/network/networkd-dhcp6.c
219@@ -3,9 +3,9 @@ 183@@ -3,9 +3,9 @@
@@ -227,11 +191,9 @@ index aa077d6219..4f6ce22059 100644
227 191
228 #include "sd-dhcp6-client.h" 192 #include "sd-dhcp6-client.h"
229 193
230diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
231index 8219d95b0d..c92230453b 100644
232--- a/src/network/networkd-link.c 194--- a/src/network/networkd-link.c
233+++ b/src/network/networkd-link.c 195+++ b/src/network/networkd-link.c
234@@ -1,8 +1,8 @@ 196@@ -1,9 +1,10 @@
235 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 197 /* SPDX-License-Identifier: LGPL-2.1-or-later */
236 198
237+#include <netinet/if_ether.h> 199+#include <netinet/if_ether.h>
@@ -239,10 +201,10 @@ index 8219d95b0d..c92230453b 100644
239 #include <linux/if.h> 201 #include <linux/if.h>
240-#include <linux/if_arp.h> 202-#include <linux/if_arp.h>
241 #include <linux/if_link.h> 203 #include <linux/if_link.h>
204+#include <linux/netdevice.h>
205 #include <sys/socket.h>
242 #include <unistd.h> 206 #include <unistd.h>
243 207
244diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
245index e5ffd35b6f..871ebb32c6 100644
246--- a/src/network/networkd-network.c 208--- a/src/network/networkd-network.c
247+++ b/src/network/networkd-network.c 209+++ b/src/network/networkd-network.c
248@@ -1,5 +1,6 @@ 210@@ -1,5 +1,6 @@
@@ -252,24 +214,6 @@ index e5ffd35b6f..871ebb32c6 100644
252 #include <net/if.h> 214 #include <net/if.h>
253 #include <netinet/in.h> 215 #include <netinet/in.h>
254 #include <linux/netdevice.h> 216 #include <linux/netdevice.h>
255diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
256index a74541a6c9..a10549b336 100644
257--- a/src/network/networkd-route.c
258+++ b/src/network/networkd-route.c
259@@ -1,7 +1,10 @@
260 /* SPDX-License-Identifier: LGPL-2.1-or-later */
261
262 #include <linux/icmpv6.h>
263-#include <linux/ipv6_route.h>
264+/* linux/ipv6_route.h conflicts with netinet/in.h so define manually */
265+#ifndef IP6_RT_PRIO_USER
266+#define IP6_RT_PRIO_USER 1024
267+#endif
268
269 #include "alloc-util.h"
270 #include "netlink-util.h"
271diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
272index ce34449554..0b5dc01182 100644
273--- a/src/network/test-network-tables.c 217--- a/src/network/test-network-tables.c
274+++ b/src/network/test-network-tables.c 218+++ b/src/network/test-network-tables.c
275@@ -1,5 +1,6 @@ 219@@ -1,5 +1,6 @@
@@ -279,8 +223,6 @@ index ce34449554..0b5dc01182 100644
279 #include "bond.h" 223 #include "bond.h"
280 #include "dhcp6-internal.h" 224 #include "dhcp6-internal.h"
281 #include "dhcp6-protocol.h" 225 #include "dhcp6-protocol.h"
282diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
283index 654d36a83a..f4ed42d543 100644
284--- a/src/shared/ethtool-util.c 226--- a/src/shared/ethtool-util.c
285+++ b/src/shared/ethtool-util.c 227+++ b/src/shared/ethtool-util.c
286@@ -1,5 +1,6 @@ 228@@ -1,5 +1,6 @@
@@ -290,8 +232,6 @@ index 654d36a83a..f4ed42d543 100644
290 #include <net/if.h> 232 #include <net/if.h>
291 #include <sys/ioctl.h> 233 #include <sys/ioctl.h>
292 #include <linux/ethtool.h> 234 #include <linux/ethtool.h>
293diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
294index 11e2906681..a171df0737 100644
295--- a/src/shared/ethtool-util.h 235--- a/src/shared/ethtool-util.h
296+++ b/src/shared/ethtool-util.h 236+++ b/src/shared/ethtool-util.h
297@@ -3,6 +3,7 @@ 237@@ -3,6 +3,7 @@
@@ -302,8 +242,6 @@ index 11e2906681..a171df0737 100644
302 #include <linux/ethtool.h> 242 #include <linux/ethtool.h>
303 243
304 #include "conf-parser.h" 244 #include "conf-parser.h"
305diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
306index 31e5d0cd67..f25f821364 100644
307--- a/src/udev/net/link-config.c 245--- a/src/udev/net/link-config.c
308+++ b/src/udev/net/link-config.c 246+++ b/src/udev/net/link-config.c
309@@ -1,5 +1,6 @@ 247@@ -1,5 +1,6 @@
@@ -313,8 +251,6 @@ index 31e5d0cd67..f25f821364 100644
313 #include <linux/netdevice.h> 251 #include <linux/netdevice.h>
314 #include <netinet/ether.h> 252 #include <netinet/ether.h>
315 #include <unistd.h> 253 #include <unistd.h>
316diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
317index 87e1fb133e..13876029d0 100644
318--- a/src/udev/udev-builtin-net_setup_link.c 254--- a/src/udev/udev-builtin-net_setup_link.c
319+++ b/src/udev/udev-builtin-net_setup_link.c 255+++ b/src/udev/udev-builtin-net_setup_link.c
320@@ -1,5 +1,6 @@ 256@@ -1,5 +1,6 @@
@@ -324,3 +260,76 @@ index 87e1fb133e..13876029d0 100644
324 #include "alloc-util.h" 260 #include "alloc-util.h"
325 #include "device-util.h" 261 #include "device-util.h"
326 #include "errno-util.h" 262 #include "errno-util.h"
263--- a/src/network/networkd-bridge-vlan.c
264+++ b/src/network/networkd-bridge-vlan.c
265@@ -4,6 +4,7 @@
266 ***/
267
268 #include <netinet/in.h>
269+#include <netinet/if_ether.h>
270 #include <linux/if_bridge.h>
271 #include <stdbool.h>
272
273--- a/src/basic/linux/in6.h
274+++ b/src/basic/linux/in6.h
275@@ -1,10 +1,10 @@
276 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
277 /*
278- * Types and definitions for AF_INET6
279- * Linux INET6 implementation
280+ * Types and definitions for AF_INET6
281+ * Linux INET6 implementation
282 *
283 * Authors:
284- * Pedro Roque <roque@di.fc.ul.pt>
285+ * Pedro Roque <roque@di.fc.ul.pt>
286 *
287 * Sources:
288 * IPv6 Program Interfaces for BSD Systems
289@@ -19,8 +19,8 @@
290 * 2 of the License, or (at your option) any later version.
291 */
292
293-#ifndef _UAPI_LINUX_IN6_H
294-#define _UAPI_LINUX_IN6_H
295+#ifndef _LINUX_IN6_H
296+#define _LINUX_IN6_H
297
298 #include <linux/types.h>
299 #include <linux/libc-compat.h>
300@@ -97,7 +97,7 @@ struct in6_flowlabel_req {
301
302
303 /*
304- * Bitmask constant declarations to help applications select out the
305+ * Bitmask constant declarations to help applications select out the
306 * flow label and priority fields.
307 *
308 * Note that this are in host byte order while the flowinfo field of
309@@ -298,4 +298,4 @@ struct in6_flowlabel_req {
310 * ...
311 * MRT6_MAX
312 */
313-#endif /* _UAPI_LINUX_IN6_H */
314+#endif /* _LINUX_IN6_H */
315--- a/src/network/networkd-route.c
316+++ b/src/network/networkd-route.c
317@@ -1,5 +1,6 @@
318 /* SPDX-License-Identifier: LGPL-2.1-or-later */
319
320+#include <netinet/in.h>
321 #include <linux/icmpv6.h>
322 #include <linux/ipv6_route.h>
323 #include <linux/nexthop.h>
324--- a/src/network/networkd-setlink.c
325+++ b/src/network/networkd-setlink.c
326@@ -1,8 +1,8 @@
327 /* SPDX-License-Identifier: LGPL-2.1-or-later */
328
329 #include <netinet/in.h>
330+#include <net/if_arp.h>
331 #include <linux/if.h>
332-#include <linux/if_arp.h>
333
334 #include "missing_network.h"
335 #include "netlink-util.h"
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index 2ff08c7fae..4a60ee32ef 100644
--- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -23,8 +23,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
23 src/tmpfiles/tmpfiles.c | 10 ++++++++++ 23 src/tmpfiles/tmpfiles.c | 10 ++++++++++
24 3 files changed, 38 insertions(+) 24 3 files changed, 38 insertions(+)
25 25
26diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
27index bc0278e57f..c973f82e54 100644
28--- a/src/basic/glob-util.c 26--- a/src/basic/glob-util.c
29+++ b/src/basic/glob-util.c 27+++ b/src/basic/glob-util.c
30@@ -12,6 +12,12 @@ 28@@ -12,6 +12,12 @@
@@ -48,7 +46,7 @@ index bc0278e57f..c973f82e54 100644
48 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ 46 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
49 assert(!(flags & GLOB_ALTDIRFUNC)); 47 assert(!(flags & GLOB_ALTDIRFUNC));
50 48
51@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { 49@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag
52 pglob->gl_lstat = lstat; 50 pglob->gl_lstat = lstat;
53 if (!pglob->gl_stat) 51 if (!pglob->gl_stat)
54 pglob->gl_stat = stat; 52 pglob->gl_stat = stat;
@@ -63,8 +61,6 @@ index bc0278e57f..c973f82e54 100644
63 if (k == GLOB_NOMATCH) 61 if (k == GLOB_NOMATCH)
64 return -ENOENT; 62 return -ENOENT;
65 if (k == GLOB_NOSPACE) 63 if (k == GLOB_NOSPACE)
66diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
67index df6444c433..79a692046e 100644
68--- a/src/test/test-glob-util.c 64--- a/src/test/test-glob-util.c
69+++ b/src/test/test-glob-util.c 65+++ b/src/test/test-glob-util.c
70@@ -12,6 +12,12 @@ 66@@ -12,6 +12,12 @@
@@ -78,9 +74,9 @@ index df6444c433..79a692046e 100644
78+#endif 74+#endif
79+ 75+
80 static void test_glob_exists(void) { 76 static void test_glob_exists(void) {
81 char name[] = "/tmp/test-glob_exists.XXXXXX"; 77 log_info("/* %s */", __func__);
82 int fd = -1; 78
83@@ -39,11 +45,13 @@ static void test_glob_no_dot(void) { 79@@ -41,11 +47,13 @@ static void test_glob_no_dot(void) {
84 const char *fn; 80 const char *fn;
85 81
86 _cleanup_globfree_ glob_t g = { 82 _cleanup_globfree_ glob_t g = {
@@ -94,7 +90,7 @@ index df6444c433..79a692046e 100644
94 }; 90 };
95 91
96 int r; 92 int r;
97@@ -51,11 +59,19 @@ static void test_glob_no_dot(void) { 93@@ -55,11 +63,19 @@ static void test_glob_no_dot(void) {
98 assert_se(mkdtemp(template)); 94 assert_se(mkdtemp(template));
99 95
100 fn = strjoina(template, "/*"); 96 fn = strjoina(template, "/*");
@@ -114,8 +110,6 @@ index df6444c433..79a692046e 100644
114 assert_se(r == GLOB_NOMATCH); 110 assert_se(r == GLOB_NOMATCH);
115 111
116 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); 112 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
117diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
118index 6b73d1e6d5..26b3b74275 100644
119--- a/src/tmpfiles/tmpfiles.c 113--- a/src/tmpfiles/tmpfiles.c
120+++ b/src/tmpfiles/tmpfiles.c 114+++ b/src/tmpfiles/tmpfiles.c
121@@ -66,6 +66,12 @@ 115@@ -66,6 +66,12 @@
@@ -131,7 +125,7 @@ index 6b73d1e6d5..26b3b74275 100644
131 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates 125 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
132 * them in the file system. This is intended to be used to create 126 * them in the file system. This is intended to be used to create
133 * properly owned directories beneath /tmp, /var/tmp, /run, which are 127 * properly owned directories beneath /tmp, /var/tmp, /run, which are
134@@ -1947,7 +1953,9 @@ finish: 128@@ -1990,7 +1996,9 @@ finish:
135 129
136 static int glob_item(Item *i, action_t action) { 130 static int glob_item(Item *i, action_t action) {
137 _cleanup_globfree_ glob_t g = { 131 _cleanup_globfree_ glob_t g = {
@@ -141,7 +135,7 @@ index 6b73d1e6d5..26b3b74275 100644
141 }; 135 };
142 int r = 0, k; 136 int r = 0, k;
143 char **fn; 137 char **fn;
144@@ -1967,7 +1975,9 @@ static int glob_item(Item *i, action_t action) { 138@@ -2010,7 +2018,9 @@ static int glob_item(Item *i, action_t a
145 139
146 static int glob_item_recursively(Item *i, fdaction_t action) { 140 static int glob_item_recursively(Item *i, fdaction_t action) {
147 _cleanup_globfree_ glob_t g = { 141 _cleanup_globfree_ glob_t g = {
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index 5f2178734d..cf06572b82 100644
--- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -31,11 +31,9 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
31 src/shared/base-filesystem.c | 6 +++--- 31 src/shared/base-filesystem.c | 6 +++---
32 2 files changed, 24 insertions(+), 5 deletions(-) 32 2 files changed, 24 insertions(+), 5 deletions(-)
33 33
34diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
35index 027037f7a7..16eb379caf 100644
36--- a/src/basic/fs-util.h 34--- a/src/basic/fs-util.h
37+++ b/src/basic/fs-util.h 35+++ b/src/basic/fs-util.h
38@@ -44,8 +44,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); 36@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct
39 int fd_warn_permissions(const char *path, int fd); 37 int fd_warn_permissions(const char *path, int fd);
40 int stat_warn_permissions(const char *path, const struct stat *st); 38 int stat_warn_permissions(const char *path, const struct stat *st);
41 39
@@ -65,20 +63,18 @@ index 027037f7a7..16eb379caf 100644
65 63
66 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); 64 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
67 int touch(const char *path); 65 int touch(const char *path);
68diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
69index 1d05409086..1ed06c31ab 100644
70--- a/src/shared/base-filesystem.c 66--- a/src/shared/base-filesystem.c
71+++ b/src/shared/base-filesystem.c 67+++ b/src/shared/base-filesystem.c
72@@ -54,7 +54,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 68@@ -53,7 +53,7 @@ int base_filesystem_create(const char *r
73 return log_error_errno(errno, "Failed to open root file system: %m"); 69 return log_error_errno(errno, "Failed to open root file system: %m");
74 70
75 for (i = 0; i < ELEMENTSOF(table); i ++) { 71 for (size_t i = 0; i < ELEMENTSOF(table); i++) {
76- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) 72- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
77+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) 73+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
78 continue; 74 continue;
79 75
80 if (table[i].target) { 76 if (table[i].target) {
81@@ -62,7 +62,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 77@@ -61,7 +61,7 @@ int base_filesystem_create(const char *r
82 78
83 /* check if one of the targets exists */ 79 /* check if one of the targets exists */
84 NULSTR_FOREACH(s, table[i].target) { 80 NULSTR_FOREACH(s, table[i].target) {
@@ -87,7 +83,7 @@ index 1d05409086..1ed06c31ab 100644
87 continue; 83 continue;
88 84
89 /* check if a specific file exists at the target path */ 85 /* check if a specific file exists at the target path */
90@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 86@@ -72,7 +72,7 @@ int base_filesystem_create(const char *r
91 if (!p) 87 if (!p)
92 return log_oom(); 88 return log_oom();
93 89
diff --git a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
index bd627c51e9..44c3ff0532 100644
--- a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch
@@ -38,11 +38,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
38 src/vconsole/vconsole-setup.c | 2 +- 38 src/vconsole/vconsole-setup.c | 2 +-
39 16 files changed, 33 insertions(+), 33 deletions(-) 39 16 files changed, 33 insertions(+), 33 deletions(-)
40 40
41diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
42index 50c1ae1b2b..5b40e92163 100644
43--- a/src/basic/cgroup-util.c 41--- a/src/basic/cgroup-util.c
44+++ b/src/basic/cgroup-util.c 42+++ b/src/basic/cgroup-util.c
45@@ -765,7 +765,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 43@@ -766,7 +766,7 @@ int cg_install_release_agent(const char
46 44
47 sc = strstrip(contents); 45 sc = strstrip(contents);
48 if (isempty(sc)) { 46 if (isempty(sc)) {
@@ -51,7 +49,7 @@ index 50c1ae1b2b..5b40e92163 100644
51 if (r < 0) 49 if (r < 0)
52 return r; 50 return r;
53 } else if (!path_equal(sc, agent)) 51 } else if (!path_equal(sc, agent))
54@@ -783,7 +783,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 52@@ -784,7 +784,7 @@ int cg_install_release_agent(const char
55 53
56 sc = strstrip(contents); 54 sc = strstrip(contents);
57 if (streq(sc, "0")) { 55 if (streq(sc, "0")) {
@@ -60,7 +58,7 @@ index 50c1ae1b2b..5b40e92163 100644
60 if (r < 0) 58 if (r < 0)
61 return r; 59 return r;
62 60
63@@ -810,7 +810,7 @@ int cg_uninstall_release_agent(const char *controller) { 61@@ -811,7 +811,7 @@ int cg_uninstall_release_agent(const cha
64 if (r < 0) 62 if (r < 0)
65 return r; 63 return r;
66 64
@@ -69,7 +67,7 @@ index 50c1ae1b2b..5b40e92163 100644
69 if (r < 0) 67 if (r < 0)
70 return r; 68 return r;
71 69
72@@ -820,7 +820,7 @@ int cg_uninstall_release_agent(const char *controller) { 70@@ -821,7 +821,7 @@ int cg_uninstall_release_agent(const cha
73 if (r < 0) 71 if (r < 0)
74 return r; 72 return r;
75 73
@@ -78,7 +76,7 @@ index 50c1ae1b2b..5b40e92163 100644
78 if (r < 0) 76 if (r < 0)
79 return r; 77 return r;
80 78
81@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri 79@@ -1651,7 +1651,7 @@ int cg_set_attribute(const char *control
82 if (r < 0) 80 if (r < 0)
83 return r; 81 return r;
84 82
@@ -87,11 +85,9 @@ index 50c1ae1b2b..5b40e92163 100644
87 } 85 }
88 86
89 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { 87 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
90diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
91index 8f9eee8d36..480f8cc0b4 100644
92--- a/src/basic/procfs-util.c 88--- a/src/basic/procfs-util.c
93+++ b/src/basic/procfs-util.c 89+++ b/src/basic/procfs-util.c
94@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { 90@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi
95 * decrease it, as threads-max is the much more relevant sysctl. */ 91 * decrease it, as threads-max is the much more relevant sysctl. */
96 if (limit > pid_max-1) { 92 if (limit > pid_max-1) {
97 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ 93 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -107,24 +103,9 @@ index 8f9eee8d36..480f8cc0b4 100644
107 if (r < 0) { 103 if (r < 0) {
108 uint64_t threads_max; 104 uint64_t threads_max;
109 105
110diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
111index 3362ee3924..80c0f2a52e 100644
112--- a/src/basic/smack-util.c
113+++ b/src/basic/smack-util.c
114@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
115 return 0;
116
117 p = procfs_file_alloca(pid, "attr/current");
118- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER);
119+ r = write_string_file(p, label, 0);
120 if (r < 0)
121 return r;
122
123diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
124index c96b5cd77f..d2476d9665 100644
125--- a/src/basic/sysctl-util.c 106--- a/src/basic/sysctl-util.c
126+++ b/src/basic/sysctl-util.c 107+++ b/src/basic/sysctl-util.c
127@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c 108@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, con
128 109
129 log_debug("Setting '%s' to '%s'", p, value); 110 log_debug("Setting '%s' to '%s'", p, value);
130 111
@@ -133,8 +114,6 @@ index c96b5cd77f..d2476d9665 100644
133 } 114 }
134 115
135 int sysctl_read(const char *property, char **ret) { 116 int sysctl_read(const char *property, char **ret) {
136diff --git a/src/basic/util.c b/src/basic/util.c
137index 955b18bd2a..6d89c90176 100644
138--- a/src/basic/util.c 117--- a/src/basic/util.c
139+++ b/src/basic/util.c 118+++ b/src/basic/util.c
140@@ -234,7 +234,7 @@ void disable_coredumps(void) { 119@@ -234,7 +234,7 @@ void disable_coredumps(void) {
@@ -146,11 +125,9 @@ index 955b18bd2a..6d89c90176 100644
146 if (r < 0) 125 if (r < 0)
147 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 126 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
148 } 127 }
149diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
150index f6b72e0bae..e9fd4d06be 100644
151--- a/src/binfmt/binfmt.c 128--- a/src/binfmt/binfmt.c
152+++ b/src/binfmt/binfmt.c 129+++ b/src/binfmt/binfmt.c
153@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { 130@@ -48,7 +48,7 @@ static int delete_rule(const char *rule)
154 if (!fn) 131 if (!fn)
155 return log_oom(); 132 return log_oom();
156 133
@@ -159,7 +136,7 @@ index f6b72e0bae..e9fd4d06be 100644
159 } 136 }
160 137
161 static int apply_rule(const char *rule) { 138 static int apply_rule(const char *rule) {
162@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) { 139@@ -56,7 +56,7 @@ static int apply_rule(const char *rule)
163 140
164 (void) delete_rule(rule); 141 (void) delete_rule(rule);
165 142
@@ -168,7 +145,7 @@ index f6b72e0bae..e9fd4d06be 100644
168 if (r < 0) 145 if (r < 0)
169 return log_error_errno(r, "Failed to add binary format: %m"); 146 return log_error_errno(r, "Failed to add binary format: %m");
170 147
171@@ -222,7 +222,7 @@ static int run(int argc, char *argv[]) { 148@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) {
172 } 149 }
173 150
174 /* Flush out all rules */ 151 /* Flush out all rules */
@@ -177,11 +154,9 @@ index f6b72e0bae..e9fd4d06be 100644
177 154
178 STRV_FOREACH(f, files) { 155 STRV_FOREACH(f, files) {
179 k = apply_file(*f, true); 156 k = apply_file(*f, true);
180diff --git a/src/core/main.c b/src/core/main.c
181index 3ee8d0a869..ec36e3e80f 100644
182--- a/src/core/main.c 157--- a/src/core/main.c
183+++ b/src/core/main.c 158+++ b/src/core/main.c
184@@ -1401,7 +1401,7 @@ static int bump_unix_max_dgram_qlen(void) { 159@@ -1402,7 +1402,7 @@ static int bump_unix_max_dgram_qlen(void
185 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) 160 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
186 return 0; 161 return 0;
187 162
@@ -190,7 +165,7 @@ index 3ee8d0a869..ec36e3e80f 100644
190 if (r < 0) 165 if (r < 0)
191 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, 166 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
192 "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); 167 "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
193@@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { 168@@ -1679,7 +1679,7 @@ static void initialize_core_pattern(bool
194 if (getpid_cached() != 1) 169 if (getpid_cached() != 1)
195 return; 170 return;
196 171
@@ -199,11 +174,9 @@ index 3ee8d0a869..ec36e3e80f 100644
199 if (r < 0) 174 if (r < 0)
200 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); 175 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
201 } 176 }
202diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
203index 8cc1696a4f..ab7b4ba2c3 100644
204--- a/src/core/smack-setup.c 177--- a/src/core/smack-setup.c
205+++ b/src/core/smack-setup.c 178+++ b/src/core/smack-setup.c
206@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { 179@@ -323,17 +323,17 @@ int mac_smack_setup(bool *loaded_policy)
207 } 180 }
208 181
209 #ifdef SMACK_RUN_LABEL 182 #ifdef SMACK_RUN_LABEL
@@ -225,8 +198,6 @@ index 8cc1696a4f..ab7b4ba2c3 100644
225 if (r < 0) 198 if (r < 0)
226 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 199 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
227 #endif 200 #endif
228diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
229index 58e35e403e..1d0beb4008 100644
230--- a/src/hibernate-resume/hibernate-resume.c 201--- a/src/hibernate-resume/hibernate-resume.c
231+++ b/src/hibernate-resume/hibernate-resume.c 202+++ b/src/hibernate-resume/hibernate-resume.c
232@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { 203@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
@@ -238,11 +209,9 @@ index 58e35e403e..1d0beb4008 100644
238 if (r < 0) { 209 if (r < 0) {
239 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); 210 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
240 return EXIT_FAILURE; 211 return EXIT_FAILURE;
241diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
242index d82f01a164..b8fd63346c 100644
243--- a/src/libsystemd/sd-device/sd-device.c 212--- a/src/libsystemd/sd-device/sd-device.c
244+++ b/src/libsystemd/sd-device/sd-device.c 213+++ b/src/libsystemd/sd-device/sd-device.c
245@@ -1987,7 +1987,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, 214@@ -2096,7 +2096,7 @@ _public_ int sd_device_set_sysattr_value
246 if (!value) 215 if (!value)
247 return -ENOMEM; 216 return -ENOMEM;
248 217
@@ -251,24 +220,9 @@ index d82f01a164..b8fd63346c 100644
251 if (r < 0) { 220 if (r < 0) {
252 /* On failure, clear cache entry, as we do not know how it fails. */ 221 /* On failure, clear cache entry, as we do not know how it fails. */
253 device_remove_cached_sysattr_value(device, sysattr); 222 device_remove_cached_sysattr_value(device, sysattr);
254diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
255index 3bc424b83b..5f5eef0843 100644
256--- a/src/login/logind-dbus.c
257+++ b/src/login/logind-dbus.c
258@@ -1330,7 +1330,7 @@ static int trigger_device(Manager *m, sd_device *d) {
259 if (!t)
260 return -ENOMEM;
261
262- (void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
263+ (void) write_string_file(t, "change", 0);
264 }
265
266 return 0;
267diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
268index cb01b25bc6..e92051268b 100644
269--- a/src/nspawn/nspawn-cgroup.c 223--- a/src/nspawn/nspawn-cgroup.c
270+++ b/src/nspawn/nspawn-cgroup.c 224+++ b/src/nspawn/nspawn-cgroup.c
271@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { 225@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
272 fn = strjoina(tree, cgroup, "/cgroup.procs"); 226 fn = strjoina(tree, cgroup, "/cgroup.procs");
273 227
274 sprintf(pid_string, PID_FMT, pid); 228 sprintf(pid_string, PID_FMT, pid);
@@ -277,11 +231,9 @@ index cb01b25bc6..e92051268b 100644
277 if (r < 0) { 231 if (r < 0) {
278 log_error_errno(r, "Failed to move process: %m"); 232 log_error_errno(r, "Failed to move process: %m");
279 goto finish; 233 goto finish;
280diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
281index 0c41a48d4b..9c893b18e4 100644
282--- a/src/nspawn/nspawn.c 234--- a/src/nspawn/nspawn.c
283+++ b/src/nspawn/nspawn.c 235+++ b/src/nspawn/nspawn.c
284@@ -2695,7 +2695,7 @@ static int reset_audit_loginuid(void) { 236@@ -2751,7 +2751,7 @@ static int reset_audit_loginuid(void) {
285 if (streq(p, "4294967295")) 237 if (streq(p, "4294967295"))
286 return 0; 238 return 0;
287 239
@@ -290,27 +242,27 @@ index 0c41a48d4b..9c893b18e4 100644
290 if (r < 0) { 242 if (r < 0) {
291 log_error_errno(r, 243 log_error_errno(r,
292 "Failed to reset audit login UID. This probably means that your kernel is too\n" 244 "Failed to reset audit login UID. This probably means that your kernel is too\n"
293@@ -3948,13 +3948,13 @@ static int setup_uid_map(pid_t pid) { 245@@ -4148,7 +4148,7 @@ static int setup_uid_map(
246 return log_oom();
294 247
295 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 248 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
296 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); 249- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
297- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); 250+ r = write_string_file(uid_map, s, 0);
298+ r = write_string_file(uid_map, line, 0);
299 if (r < 0) 251 if (r < 0)
300 return log_error_errno(r, "Failed to write UID map: %m"); 252 return log_error_errno(r, "Failed to write UID map: %m");
301 253
302 /* We always assign the same UID and GID ranges */ 254@@ -4158,7 +4158,7 @@ static int setup_uid_map(
255 return log_oom();
256
303 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); 257 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
304- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); 258- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
305+ r = write_string_file(uid_map, line, 0); 259+ r = write_string_file(uid_map, s, 0);
306 if (r < 0) 260 if (r < 0)
307 return log_error_errno(r, "Failed to write GID map: %m"); 261 return log_error_errno(r, "Failed to write GID map: %m");
308 262
309diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
310index f197f715c7..077f893177 100644
311--- a/src/shared/cgroup-setup.c 263--- a/src/shared/cgroup-setup.c
312+++ b/src/shared/cgroup-setup.c 264+++ b/src/shared/cgroup-setup.c
313@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { 265@@ -267,7 +267,7 @@ int cg_attach(const char *controller, co
314 266
315 xsprintf(c, PID_FMT "\n", pid); 267 xsprintf(c, PID_FMT "\n", pid);
316 268
@@ -328,11 +280,9 @@ index f197f715c7..077f893177 100644
328 if (r < 0) { 280 if (r < 0) {
329 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", 281 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
330 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); 282 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
331diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
332index 262d4cea66..0523e8dc9b 100644
333--- a/src/sleep/sleep.c 283--- a/src/sleep/sleep.c
334+++ b/src/sleep/sleep.c 284+++ b/src/sleep/sleep.c
335@@ -48,7 +48,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca 285@@ -46,7 +46,7 @@ static int write_hibernate_location_info
336 assert(hibernate_location->swap); 286 assert(hibernate_location->swap);
337 287
338 xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); 288 xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
@@ -341,7 +291,7 @@ index 262d4cea66..0523e8dc9b 100644
341 if (r < 0) 291 if (r < 0)
342 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", 292 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
343 hibernate_location->swap->device, resume_str); 293 hibernate_location->swap->device, resume_str);
344@@ -75,7 +75,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca 294@@ -73,7 +73,7 @@ static int write_hibernate_location_info
345 } 295 }
346 296
347 xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); 297 xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
@@ -350,7 +300,7 @@ index 262d4cea66..0523e8dc9b 100644
350 if (r < 0) 300 if (r < 0)
351 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", 301 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m",
352 hibernate_location->swap->device, offset_str); 302 hibernate_location->swap->device, offset_str);
353@@ -92,7 +92,7 @@ static int write_mode(char **modes) { 303@@ -90,7 +90,7 @@ static int write_mode(char **modes) {
354 STRV_FOREACH(mode, modes) { 304 STRV_FOREACH(mode, modes) {
355 int k; 305 int k;
356 306
@@ -359,7 +309,7 @@ index 262d4cea66..0523e8dc9b 100644
359 if (k >= 0) 309 if (k >= 0)
360 return 0; 310 return 0;
361 311
362@@ -114,7 +114,7 @@ static int write_state(FILE **f, char **states) { 312@@ -112,7 +112,7 @@ static int write_state(FILE **f, char **
363 STRV_FOREACH(state, states) { 313 STRV_FOREACH(state, states) {
364 int k; 314 int k;
365 315
@@ -368,11 +318,9 @@ index 262d4cea66..0523e8dc9b 100644
368 if (k >= 0) 318 if (k >= 0)
369 return 0; 319 return 0;
370 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); 320 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
371diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
372index d1c3febdd5..1cc68694d1 100644
373--- a/src/vconsole/vconsole-setup.c 321--- a/src/vconsole/vconsole-setup.c
374+++ b/src/vconsole/vconsole-setup.c 322+++ b/src/vconsole/vconsole-setup.c
375@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { 323@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *na
376 static int toggle_utf8_sysfs(bool utf8) { 324 static int toggle_utf8_sysfs(bool utf8) {
377 int r; 325 int r;
378 326
@@ -381,3 +329,32 @@ index d1c3febdd5..1cc68694d1 100644
381 if (r < 0) 329 if (r < 0)
382 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); 330 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
383 331
332--- a/src/shared/mount-util.c
333+++ b/src/shared/mount-util.c
334@@ -1019,13 +1019,13 @@ static int make_userns(uid_t uid_shift,
335 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, uid_shift, uid_range);
336
337 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
338- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER);
339+ r = write_string_file(uid_map, line, 0);
340 if (r < 0)
341 return log_error_errno(r, "Failed to write UID map: %m");
342
343 /* We always assign the same UID and GID ranges */
344 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
345- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER);
346+ r = write_string_file(uid_map, line, 0);
347 if (r < 0)
348 return log_error_errno(r, "Failed to write GID map: %m");
349
350--- a/src/shared/smack-util.c
351+++ b/src/shared/smack-util.c
352@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const
353 return 0;
354
355 p = procfs_file_alloca(pid, "attr/current");
356- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER);
357+ r = write_string_file(p, label, 0);
358 if (r < 0)
359 return r;
360
diff --git a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
index 068600fa44..9394eeb450 100644
--- a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
+++ b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch
@@ -17,8 +17,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
17 src/shared/userdb.c | 6 ++++++ 17 src/shared/userdb.c | 6 ++++++
18 3 files changed, 30 insertions(+) 18 3 files changed, 30 insertions(+)
19 19
20diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
21index 88b8fc2f8f..a819d41bac 100644
22--- a/src/shared/user-record-nss.c 20--- a/src/shared/user-record-nss.c
23+++ b/src/shared/user-record-nss.c 21+++ b/src/shared/user-record-nss.c
24@@ -331,8 +331,10 @@ int nss_group_to_group_record( 22@@ -331,8 +331,10 @@ int nss_group_to_group_record(
@@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644
48 46
49 r = json_build(&g->json, JSON_BUILD_OBJECT( 47 r = json_build(&g->json, JSON_BUILD_OBJECT(
50 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), 48 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
51@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 49@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou
52 assert(ret_sgrp); 50 assert(ret_sgrp);
53 assert(ret_buffer); 51 assert(ret_buffer);
54 52
@@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644
56 for (;;) { 54 for (;;) {
57 _cleanup_free_ char *buf = NULL; 55 _cleanup_free_ char *buf = NULL;
58 struct sgrp sgrp, *result; 56 struct sgrp sgrp, *result;
59@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 57@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou
60 buflen *= 2; 58 buflen *= 2;
61 buf = mfree(buf); 59 buf = mfree(buf);
62 } 60 }
@@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644
122 if (r < 0) 120 if (r < 0)
123 return r; 121 return r;
124 122
125diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h
126index 22ab04d6ee..4e52e7a911 100644
127--- a/src/shared/user-record-nss.h 123--- a/src/shared/user-record-nss.h
128+++ b/src/shared/user-record-nss.h 124+++ b/src/shared/user-record-nss.h
129@@ -2,7 +2,11 @@ 125@@ -2,7 +2,11 @@
@@ -138,28 +134,26 @@ index 22ab04d6ee..4e52e7a911 100644
138 #include <pwd.h> 134 #include <pwd.h>
139 #include <shadow.h> 135 #include <shadow.h>
140 136
141diff --git a/src/shared/userdb.c b/src/shared/userdb.c
142index 613350bd46..5c821d28cd 100644
143--- a/src/shared/userdb.c 137--- a/src/shared/userdb.c
144+++ b/src/shared/userdb.c 138+++ b/src/shared/userdb.c
145@@ -938,13 +938,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 139@@ -1047,13 +1047,15 @@ int groupdb_iterator_get(UserDBIterator
146 if (gr) { 140 if (gr) {
147 _cleanup_free_ char *buffer = NULL; 141 _cleanup_free_ char *buffer = NULL;
148 bool incomplete = false; 142 bool incomplete = false;
149+#if ENABLE_GSHADOW 143+#if ENABLE_GSHADOW
150 struct sgrp sgrp; 144 struct sgrp sgrp;
145-
151+#endif 146+#endif
152
153 if (streq_ptr(gr->gr_name, "root")) 147 if (streq_ptr(gr->gr_name, "root"))
154 iterator->synthesize_root = false; 148 iterator->synthesize_root = false;
155 if (gr->gr_gid == GID_NOBODY) 149 if (gr->gr_gid == GID_NOBODY)
156 iterator->synthesize_nobody = false; 150 iterator->synthesize_nobody = false;
157 151
158+#if ENABLE_GSHADOW 152+#if ENABLE_GSHADOW
159 if (!FLAGS_SET(iterator->flags, USERDB_AVOID_SHADOW)) { 153 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
160 r = nss_sgrp_for_group(gr, &sgrp, &buffer); 154 r = nss_sgrp_for_group(gr, &sgrp, &buffer);
161 if (r < 0) { 155 if (r < 0) {
162@@ -957,6 +960,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 156@@ -1066,6 +1068,9 @@ int groupdb_iterator_get(UserDBIterator
163 } 157 }
164 158
165 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); 159 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);