summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/systemd/systemd-boot_246.bb (renamed from meta/recipes-core/systemd/systemd-boot_245.6.bb)0
-rw-r--r--meta/recipes-core/systemd/systemd-conf_246.bb (renamed from meta/recipes-core/systemd/systemd-conf_245.6.bb)0
-rw-r--r--meta/recipes-core/systemd/systemd.inc4
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch73
-rw-r--r--meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch34
-rw-r--r--meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch198
-rw-r--r--meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch40
-rw-r--r--meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch52
-rw-r--r--meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch175
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch166
-rw-r--r--meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch32
-rw-r--r--meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch30
-rw-r--r--meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch26
-rw-r--r--meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch10
-rw-r--r--meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch20
-rw-r--r--meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch23
-rw-r--r--meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch37
-rw-r--r--meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch31
-rw-r--r--meta/recipes-core/systemd/systemd/CVE-2020-13776.patch96
-rw-r--r--meta/recipes-core/systemd/systemd_246.bb (renamed from meta/recipes-core/systemd/systemd_245.6.bb)5
22 files changed, 539 insertions, 533 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_245.6.bb b/meta/recipes-core/systemd/systemd-boot_246.bb
index f92c639810..f92c639810 100644
--- a/meta/recipes-core/systemd/systemd-boot_245.6.bb
+++ b/meta/recipes-core/systemd/systemd-boot_246.bb
diff --git a/meta/recipes-core/systemd/systemd-conf_245.6.bb b/meta/recipes-core/systemd/systemd-conf_246.bb
index d9ec023bfd..d9ec023bfd 100644
--- a/meta/recipes-core/systemd/systemd-conf_245.6.bb
+++ b/meta/recipes-core/systemd/systemd-conf_246.bb
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 8c758ab556..8ce78efbbd 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1"
14LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ 14LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
15 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" 15 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
16 16
17SRCREV = "aa0cb635f1f6a4d9b50ed2cca7782f3f751be933" 17SRCREV = "5c68ad14af6c89261f31f0abb4850fb1c99e8cfd"
18SRCBRANCH = "v245-stable" 18SRCBRANCH = "v246-stable"
19SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" 19SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
20 20
21S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
index 26a597d45b..723cd2e52e 100644
--- a/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
+++ b/meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
@@ -14,10 +14,10 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
14 src/shared/userdb.c | 6 ++++++ 14 src/shared/userdb.c | 6 ++++++
15 3 files changed, 30 insertions(+) 15 3 files changed, 30 insertions(+)
16 16
17diff --git a/src/shared/group-record-nss.c b/src/shared/group-record-nss.c 17Index: systemd-stable/src/shared/group-record-nss.c
18index 77924f1c4067..c64490253ff3 100644 18===================================================================
19--- a/src/shared/group-record-nss.c 19--- systemd-stable.orig/src/shared/group-record-nss.c
20+++ b/src/shared/group-record-nss.c 20+++ systemd-stable/src/shared/group-record-nss.c
21@@ -19,8 +19,10 @@ int nss_group_to_group_record( 21@@ -19,8 +19,10 @@ int nss_group_to_group_record(
22 if (isempty(grp->gr_name)) 22 if (isempty(grp->gr_name))
23 return -EINVAL; 23 return -EINVAL;
@@ -45,7 +45,7 @@ index 77924f1c4067..c64490253ff3 100644
45 45
46 r = json_build(&g->json, JSON_BUILD_OBJECT( 46 r = json_build(&g->json, JSON_BUILD_OBJECT(
47 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), 47 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
48@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 48@@ -76,6 +80,7 @@ int nss_sgrp_for_group(const struct grou
49 assert(ret_sgrp); 49 assert(ret_sgrp);
50 assert(ret_buffer); 50 assert(ret_buffer);
51 51
@@ -53,7 +53,7 @@ index 77924f1c4067..c64490253ff3 100644
53 for (;;) { 53 for (;;) {
54 _cleanup_free_ char *buf = NULL; 54 _cleanup_free_ char *buf = NULL;
55 struct sgrp sgrp, *result; 55 struct sgrp sgrp, *result;
56@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 56@@ -104,6 +109,9 @@ int nss_sgrp_for_group(const struct grou
57 buflen *= 2; 57 buflen *= 2;
58 buf = mfree(buf); 58 buf = mfree(buf);
59 } 59 }
@@ -62,67 +62,67 @@ index 77924f1c4067..c64490253ff3 100644
62+#endif 62+#endif
63 } 63 }
64 64
65 int nss_group_record_by_name(const char *name, GroupRecord **ret) { 65 int nss_group_record_by_name(
66@@ -111,7 +119,9 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) { 66@@ -115,7 +123,9 @@ int nss_group_record_by_name(
67 struct group grp, *result; 67 struct group grp, *result;
68 bool incomplete = false; 68 bool incomplete = false;
69 size_t buflen = 4096; 69 size_t buflen = 4096;
70+#if ENABLE_GSHADOW 70+#if ENABLE_GSHADOW
71 struct sgrp sgrp; 71 struct sgrp sgrp, *sresult = NULL;
72+#endif 72+#endif
73 int r; 73 int r;
74 74
75 assert(name); 75 assert(name);
76@@ -141,6 +151,7 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) { 76@@ -145,6 +155,7 @@ int nss_group_record_by_name(
77 buf = mfree(buf); 77 buf = mfree(buf);
78 } 78 }
79 79
80+#if ENABLE_GSHADOW 80+#if ENABLE_GSHADOW
81 r = nss_sgrp_for_group(result, &sgrp, &sbuf); 81 if (with_shadow) {
82 if (r < 0) { 82 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
83 log_debug_errno(r, "Failed to do shadow lookup for group %s, ignoring: %m", result->gr_name); 83 if (r < 0) {
84@@ -148,6 +159,9 @@ int nss_group_record_by_name(const char *name, GroupRecord **ret) { 84@@ -156,6 +167,9 @@ int nss_group_record_by_name(
85 } 85 incomplete = true;
86 86
87 r = nss_group_to_group_record(result, r >= 0 ? &sgrp : NULL, ret); 87 r = nss_group_to_group_record(result, sresult, ret);
88+#else 88+#else
89+ r = nss_group_to_group_record(result, NULL, ret); 89+ r = nss_group_to_group_record(result, NULL, ret);
90+#endif 90+#endif
91 if (r < 0) 91 if (r < 0)
92 return r; 92 return r;
93 93
94@@ -160,7 +174,9 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) { 94@@ -172,7 +186,9 @@ int nss_group_record_by_gid(
95 struct group grp, *result; 95 struct group grp, *result;
96 bool incomplete = false; 96 bool incomplete = false;
97 size_t buflen = 4096; 97 size_t buflen = 4096;
98+#if ENABLE_GSHADOW 98+#if ENABLE_GSHADOW
99 struct sgrp sgrp; 99 struct sgrp sgrp, *sresult = NULL;
100+#endif 100+#endif
101 int r; 101 int r;
102 102
103 assert(ret); 103 assert(ret);
104@@ -188,6 +204,7 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) { 104@@ -200,6 +216,7 @@ int nss_group_record_by_gid(
105 buf = mfree(buf); 105 buf = mfree(buf);
106 } 106 }
107 107
108+#if ENABLE_GSHADOW 108+#if ENABLE_GSHADOW
109 r = nss_sgrp_for_group(result, &sgrp, &sbuf); 109 if (with_shadow) {
110 if (r < 0) { 110 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
111 log_debug_errno(r, "Failed to do shadow lookup for group %s, ignoring: %m", result->gr_name); 111 if (r < 0) {
112@@ -195,6 +212,9 @@ int nss_group_record_by_gid(gid_t gid, GroupRecord **ret) { 112@@ -211,6 +228,9 @@ int nss_group_record_by_gid(
113 } 113 incomplete = true;
114 114
115 r = nss_group_to_group_record(result, r >= 0 ? &sgrp : NULL, ret); 115 r = nss_group_to_group_record(result, sresult, ret);
116+#else 116+#else
117+ r = nss_group_to_group_record(result, NULL, ret); 117+ r = nss_group_to_group_record(result, NULL, ret);
118+#endif 118+#endif
119 if (r < 0) 119 if (r < 0)
120 return r; 120 return r;
121 121
122diff --git a/src/shared/group-record-nss.h b/src/shared/group-record-nss.h 122Index: systemd-stable/src/shared/group-record-nss.h
123index 38b2995178ff..d7d95c44cf11 100644 123===================================================================
124--- a/src/shared/group-record-nss.h 124--- systemd-stable.orig/src/shared/group-record-nss.h
125+++ b/src/shared/group-record-nss.h 125+++ systemd-stable/src/shared/group-record-nss.h
126@@ -2,7 +2,11 @@ 126@@ -2,7 +2,11 @@
127 #pragma once 127 #pragma once
128 128
@@ -135,11 +135,11 @@ index 38b2995178ff..d7d95c44cf11 100644
135 135
136 #include "group-record.h" 136 #include "group-record.h"
137 137
138diff --git a/src/shared/userdb.c b/src/shared/userdb.c 138Index: systemd-stable/src/shared/userdb.c
139index 92f8796768d7..5d912862f85c 100644 139===================================================================
140--- a/src/shared/userdb.c 140--- systemd-stable.orig/src/shared/userdb.c
141+++ b/src/shared/userdb.c 141+++ systemd-stable/src/shared/userdb.c
142@@ -924,13 +924,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 142@@ -930,13 +930,16 @@ int groupdb_iterator_get(UserDBIterator
143 if (gr) { 143 if (gr) {
144 _cleanup_free_ char *buffer = NULL; 144 _cleanup_free_ char *buffer = NULL;
145 bool incomplete = false; 145 bool incomplete = false;
@@ -156,7 +156,7 @@ index 92f8796768d7..5d912862f85c 100644
156 r = nss_sgrp_for_group(gr, &sgrp, &buffer); 156 r = nss_sgrp_for_group(gr, &sgrp, &buffer);
157 if (r < 0) { 157 if (r < 0) {
158 log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name); 158 log_debug_errno(r, "Failed to acquire shadow entry for group %s, ignoring: %m", gr->gr_name);
159@@ -938,6 +941,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 159@@ -944,6 +947,9 @@ int groupdb_iterator_get(UserDBIterator
160 } 160 }
161 161
162 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); 162 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
@@ -166,6 +166,3 @@ index 92f8796768d7..5d912862f85c 100644
166 if (r < 0) 166 if (r < 0)
167 return r; 167 return r;
168 168
169--
1702.17.1
171
diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 26f70b35d0..2676c144f2 100644
--- a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -25,21 +25,21 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
25 units/systemd-binfmt.service.in | 4 ++++ 25 units/systemd-binfmt.service.in | 4 ++++
26 3 files changed, 9 insertions(+), 4 deletions(-) 26 3 files changed, 9 insertions(+), 4 deletions(-)
27 27
28diff --git a/units/meson.build b/units/meson.build 28Index: systemd-stable/units/meson.build
29index ea91f0cc9ea7..25186f88dfeb 100644 29===================================================================
30--- a/units/meson.build 30--- systemd-stable.orig/units/meson.build
31+++ b/units/meson.build 31+++ systemd-stable/units/meson.build
32@@ -52,8 +52,7 @@ units = [ 32@@ -54,8 +54,7 @@ units = [
33 ['poweroff.target', '', 33 ['poweroff.target', '',
34 'runlevel0.target'], 34 (with_runlevels ? 'runlevel0.target' : '')],
35 ['printer.target', ''], 35 ['printer.target', ''],
36- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT', 36- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
37- 'sysinit.target.wants/'], 37- 'sysinit.target.wants/'],
38+ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'], 38+ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'],
39 ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], 39 ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
40 ['reboot.target', '', 40 ['reboot.target', '',
41 'runlevel6.target ctrl-alt-del.target'], 41 (with_runlevels ? 'runlevel6.target ctrl-alt-del.target' : 'ctrl-alt-del.target')],
42@@ -161,8 +160,7 @@ in_units = [ 42@@ -162,8 +161,7 @@ in_units = [
43 ['rc-local.service', 'HAVE_SYSV_COMPAT'], 43 ['rc-local.service', 'HAVE_SYSV_COMPAT'],
44 ['rescue.service', ''], 44 ['rescue.service', ''],
45 ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], 45 ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
@@ -49,10 +49,10 @@ index ea91f0cc9ea7..25186f88dfeb 100644
49 ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'], 49 ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'],
50 ['systemd-boot-check-no-failures.service', ''], 50 ['systemd-boot-check-no-failures.service', ''],
51 ['systemd-coredump@.service', 'ENABLE_COREDUMP'], 51 ['systemd-coredump@.service', 'ENABLE_COREDUMP'],
52diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount 52Index: systemd-stable/units/proc-sys-fs-binfmt_misc.automount
53index 30a6bc991844..4231f3b70fe9 100644 53===================================================================
54--- a/units/proc-sys-fs-binfmt_misc.automount 54--- systemd-stable.orig/units/proc-sys-fs-binfmt_misc.automount
55+++ b/units/proc-sys-fs-binfmt_misc.automount 55+++ systemd-stable/units/proc-sys-fs-binfmt_misc.automount
56@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/ 56@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
57 57
58 [Automount] 58 [Automount]
@@ -60,11 +60,11 @@ index 30a6bc991844..4231f3b70fe9 100644
60+ 60+
61+[Install] 61+[Install]
62+WantedBy=sysinit.target 62+WantedBy=sysinit.target
63diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in 63Index: systemd-stable/units/systemd-binfmt.service.in
64index e54e95e11d5d..372a598614d3 100644 64===================================================================
65--- a/units/systemd-binfmt.service.in 65--- systemd-stable.orig/units/systemd-binfmt.service.in
66+++ b/units/systemd-binfmt.service.in 66+++ systemd-stable/units/systemd-binfmt.service.in
67@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm 67@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc
68 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 68 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
69 DefaultDependencies=no 69 DefaultDependencies=no
70 Conflicts=shutdown.target 70 Conflicts=shutdown.target
diff --git a/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
index 4eeec7b7da..39a975319b 100644
--- a/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch
@@ -40,11 +40,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
40 src/vconsole/vconsole-setup.c | 2 +- 40 src/vconsole/vconsole-setup.c | 2 +-
41 18 files changed, 35 insertions(+), 35 deletions(-) 41 18 files changed, 35 insertions(+), 35 deletions(-)
42 42
43diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c 43Index: systemd-stable/src/basic/cgroup-util.c
44index a5141f4cbedd..04c06e7a55cb 100644 44===================================================================
45--- a/src/basic/cgroup-util.c 45--- systemd-stable.orig/src/basic/cgroup-util.c
46+++ b/src/basic/cgroup-util.c 46+++ systemd-stable/src/basic/cgroup-util.c
47@@ -739,7 +739,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 47@@ -769,7 +769,7 @@ int cg_install_release_agent(const char
48 48
49 sc = strstrip(contents); 49 sc = strstrip(contents);
50 if (isempty(sc)) { 50 if (isempty(sc)) {
@@ -53,7 +53,7 @@ index a5141f4cbedd..04c06e7a55cb 100644
53 if (r < 0) 53 if (r < 0)
54 return r; 54 return r;
55 } else if (!path_equal(sc, agent)) 55 } else if (!path_equal(sc, agent))
56@@ -757,7 +757,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 56@@ -787,7 +787,7 @@ int cg_install_release_agent(const char
57 57
58 sc = strstrip(contents); 58 sc = strstrip(contents);
59 if (streq(sc, "0")) { 59 if (streq(sc, "0")) {
@@ -62,7 +62,7 @@ index a5141f4cbedd..04c06e7a55cb 100644
62 if (r < 0) 62 if (r < 0)
63 return r; 63 return r;
64 64
65@@ -784,7 +784,7 @@ int cg_uninstall_release_agent(const char *controller) { 65@@ -814,7 +814,7 @@ int cg_uninstall_release_agent(const cha
66 if (r < 0) 66 if (r < 0)
67 return r; 67 return r;
68 68
@@ -71,7 +71,7 @@ index a5141f4cbedd..04c06e7a55cb 100644
71 if (r < 0) 71 if (r < 0)
72 return r; 72 return r;
73 73
74@@ -794,7 +794,7 @@ int cg_uninstall_release_agent(const char *controller) { 74@@ -824,7 +824,7 @@ int cg_uninstall_release_agent(const cha
75 if (r < 0) 75 if (r < 0)
76 return r; 76 return r;
77 77
@@ -80,7 +80,7 @@ index a5141f4cbedd..04c06e7a55cb 100644
80 if (r < 0) 80 if (r < 0)
81 return r; 81 return r;
82 82
83@@ -1650,7 +1650,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri 83@@ -1656,7 +1656,7 @@ int cg_set_attribute(const char *control
84 if (r < 0) 84 if (r < 0)
85 return r; 85 return r;
86 86
@@ -89,11 +89,11 @@ index a5141f4cbedd..04c06e7a55cb 100644
89 } 89 }
90 90
91 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { 91 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
92diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c 92Index: systemd-stable/src/basic/procfs-util.c
93index da7e836f143e..2138f20bcc03 100644 93===================================================================
94--- a/src/basic/procfs-util.c 94--- systemd-stable.orig/src/basic/procfs-util.c
95+++ b/src/basic/procfs-util.c 95+++ systemd-stable/src/basic/procfs-util.c
96@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { 96@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limi
97 * decrease it, as threads-max is the much more relevant sysctl. */ 97 * decrease it, as threads-max is the much more relevant sysctl. */
98 if (limit > pid_max-1) { 98 if (limit > pid_max-1) {
99 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ 99 sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */
@@ -109,11 +109,11 @@ index da7e836f143e..2138f20bcc03 100644
109 if (r < 0) { 109 if (r < 0) {
110 uint64_t threads_max; 110 uint64_t threads_max;
111 111
112diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c 112Index: systemd-stable/src/basic/smack-util.c
113index da9a2139d31a..5e91f5b8f5d9 100644 113===================================================================
114--- a/src/basic/smack-util.c 114--- systemd-stable.orig/src/basic/smack-util.c
115+++ b/src/basic/smack-util.c 115+++ systemd-stable/src/basic/smack-util.c
116@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { 116@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const
117 return 0; 117 return 0;
118 118
119 p = procfs_file_alloca(pid, "attr/current"); 119 p = procfs_file_alloca(pid, "attr/current");
@@ -122,10 +122,10 @@ index da9a2139d31a..5e91f5b8f5d9 100644
122 if (r < 0) 122 if (r < 0)
123 return r; 123 return r;
124 124
125diff --git a/src/basic/util.c b/src/basic/util.c 125Index: systemd-stable/src/basic/util.c
126index 2b3b3918a32f..aff8d0fcd473 100644 126===================================================================
127--- a/src/basic/util.c 127--- systemd-stable.orig/src/basic/util.c
128+++ b/src/basic/util.c 128+++ systemd-stable/src/basic/util.c
129@@ -267,7 +267,7 @@ void disable_coredumps(void) { 129@@ -267,7 +267,7 @@ void disable_coredumps(void) {
130 if (detect_container() > 0) 130 if (detect_container() > 0)
131 return; 131 return;
@@ -135,11 +135,11 @@ index 2b3b3918a32f..aff8d0fcd473 100644
135 if (r < 0) 135 if (r < 0)
136 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 136 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
137 } 137 }
138diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c 138Index: systemd-stable/src/binfmt/binfmt.c
139index 7ff844c78c3a..5c5721d7c2f7 100644 139===================================================================
140--- a/src/binfmt/binfmt.c 140--- systemd-stable.orig/src/binfmt/binfmt.c
141+++ b/src/binfmt/binfmt.c 141+++ systemd-stable/src/binfmt/binfmt.c
142@@ -47,7 +47,7 @@ static int delete_rule(const char *rule) { 142@@ -48,7 +48,7 @@ static int delete_rule(const char *rule)
143 if (!fn) 143 if (!fn)
144 return log_oom(); 144 return log_oom();
145 145
@@ -148,7 +148,7 @@ index 7ff844c78c3a..5c5721d7c2f7 100644
148 } 148 }
149 149
150 static int apply_rule(const char *rule) { 150 static int apply_rule(const char *rule) {
151@@ -55,7 +55,7 @@ static int apply_rule(const char *rule) { 151@@ -56,7 +56,7 @@ static int apply_rule(const char *rule)
152 152
153 (void) delete_rule(rule); 153 (void) delete_rule(rule);
154 154
@@ -157,7 +157,7 @@ index 7ff844c78c3a..5c5721d7c2f7 100644
157 if (r < 0) 157 if (r < 0)
158 return log_error_errno(r, "Failed to add binary format: %m"); 158 return log_error_errno(r, "Failed to add binary format: %m");
159 159
160@@ -212,7 +212,7 @@ static int run(int argc, char *argv[]) { 160@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) {
161 } 161 }
162 162
163 /* Flush out all rules */ 163 /* Flush out all rules */
@@ -166,11 +166,11 @@ index 7ff844c78c3a..5c5721d7c2f7 100644
166 166
167 STRV_FOREACH(f, files) { 167 STRV_FOREACH(f, files) {
168 k = apply_file(*f, true); 168 k = apply_file(*f, true);
169diff --git a/src/core/main.c b/src/core/main.c 169Index: systemd-stable/src/core/main.c
170index 3c6b66e89c8e..c39ebe56a5b3 100644 170===================================================================
171--- a/src/core/main.c 171--- systemd-stable.orig/src/core/main.c
172+++ b/src/core/main.c 172+++ systemd-stable/src/core/main.c
173@@ -1312,7 +1312,7 @@ static int bump_unix_max_dgram_qlen(void) { 173@@ -1382,7 +1382,7 @@ static int bump_unix_max_dgram_qlen(void
174 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) 174 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
175 return 0; 175 return 0;
176 176
@@ -179,7 +179,7 @@ index 3c6b66e89c8e..c39ebe56a5b3 100644
179 if (r < 0) 179 if (r < 0)
180 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, 180 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
181 "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); 181 "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
182@@ -1536,7 +1536,7 @@ static void initialize_core_pattern(bool skip_setup) { 182@@ -1668,7 +1668,7 @@ static void initialize_core_pattern(bool
183 if (getpid_cached() != 1) 183 if (getpid_cached() != 1)
184 return; 184 return;
185 185
@@ -188,11 +188,11 @@ index 3c6b66e89c8e..c39ebe56a5b3 100644
188 if (r < 0) 188 if (r < 0)
189 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); 189 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
190 } 190 }
191diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c 191Index: systemd-stable/src/core/smack-setup.c
192index 4427397f2715..8aeb5c829513 100644 192===================================================================
193--- a/src/core/smack-setup.c 193--- systemd-stable.orig/src/core/smack-setup.c
194+++ b/src/core/smack-setup.c 194+++ systemd-stable/src/core/smack-setup.c
195@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { 195@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy)
196 } 196 }
197 197
198 #ifdef SMACK_RUN_LABEL 198 #ifdef SMACK_RUN_LABEL
@@ -214,10 +214,10 @@ index 4427397f2715..8aeb5c829513 100644
214 if (r < 0) 214 if (r < 0)
215 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 215 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
216 #endif 216 #endif
217diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c 217Index: systemd-stable/src/hibernate-resume/hibernate-resume.c
218index 17e7cd1a009b..87a766771663 100644 218===================================================================
219--- a/src/hibernate-resume/hibernate-resume.c 219--- systemd-stable.orig/src/hibernate-resume/hibernate-resume.c
220+++ b/src/hibernate-resume/hibernate-resume.c 220+++ systemd-stable/src/hibernate-resume/hibernate-resume.c
221@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { 221@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
222 return EXIT_FAILURE; 222 return EXIT_FAILURE;
223 } 223 }
@@ -227,11 +227,11 @@ index 17e7cd1a009b..87a766771663 100644
227 if (r < 0) { 227 if (r < 0) {
228 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); 228 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
229 return EXIT_FAILURE; 229 return EXIT_FAILURE;
230diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c 230Index: systemd-stable/src/libsystemd/sd-device/sd-device.c
231index 1f2451f8e1b4..3f676ec2841a 100644 231===================================================================
232--- a/src/libsystemd/sd-device/sd-device.c 232--- systemd-stable.orig/src/libsystemd/sd-device/sd-device.c
233+++ b/src/libsystemd/sd-device/sd-device.c 233+++ systemd-stable/src/libsystemd/sd-device/sd-device.c
234@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, 234@@ -1877,7 +1877,7 @@ _public_ int sd_device_set_sysattr_value
235 if (!value) 235 if (!value)
236 return -ENOMEM; 236 return -ENOMEM;
237 237
@@ -240,11 +240,11 @@ index 1f2451f8e1b4..3f676ec2841a 100644
240 if (r < 0) { 240 if (r < 0) {
241 if (r == -ELOOP) 241 if (r == -ELOOP)
242 return -EINVAL; 242 return -EINVAL;
243diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c 243Index: systemd-stable/src/login/logind-dbus.c
244index 52a7ea3c77e9..9703de0dabee 100644 244===================================================================
245--- a/src/login/logind-dbus.c 245--- systemd-stable.orig/src/login/logind-dbus.c
246+++ b/src/login/logind-dbus.c 246+++ systemd-stable/src/login/logind-dbus.c
247@@ -1339,7 +1339,7 @@ static int trigger_device(Manager *m, sd_device *d) { 247@@ -1341,7 +1341,7 @@ static int trigger_device(Manager *m, sd
248 if (!t) 248 if (!t)
249 return -ENOMEM; 249 return -ENOMEM;
250 250
@@ -253,11 +253,11 @@ index 52a7ea3c77e9..9703de0dabee 100644
253 } 253 }
254 254
255 return 0; 255 return 0;
256diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c 256Index: systemd-stable/src/nspawn/nspawn-cgroup.c
257index f5048d9473cb..b6383ab5c97e 100644 257===================================================================
258--- a/src/nspawn/nspawn-cgroup.c 258--- systemd-stable.orig/src/nspawn/nspawn-cgroup.c
259+++ b/src/nspawn/nspawn-cgroup.c 259+++ systemd-stable/src/nspawn/nspawn-cgroup.c
260@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { 260@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified
261 fn = strjoina(tree, cgroup, "/cgroup.procs"); 261 fn = strjoina(tree, cgroup, "/cgroup.procs");
262 262
263 sprintf(pid_string, PID_FMT, pid); 263 sprintf(pid_string, PID_FMT, pid);
@@ -266,11 +266,11 @@ index f5048d9473cb..b6383ab5c97e 100644
266 if (r < 0) { 266 if (r < 0) {
267 log_error_errno(r, "Failed to move process: %m"); 267 log_error_errno(r, "Failed to move process: %m");
268 goto finish; 268 goto finish;
269diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 269Index: systemd-stable/src/nspawn/nspawn.c
270index 734dee1130e0..71add9a055d2 100644 270===================================================================
271--- a/src/nspawn/nspawn.c 271--- systemd-stable.orig/src/nspawn/nspawn.c
272+++ b/src/nspawn/nspawn.c 272+++ systemd-stable/src/nspawn/nspawn.c
273@@ -2440,7 +2440,7 @@ static int reset_audit_loginuid(void) { 273@@ -2493,7 +2493,7 @@ static int reset_audit_loginuid(void) {
274 if (streq(p, "4294967295")) 274 if (streq(p, "4294967295"))
275 return 0; 275 return 0;
276 276
@@ -279,7 +279,7 @@ index 734dee1130e0..71add9a055d2 100644
279 if (r < 0) { 279 if (r < 0) {
280 log_error_errno(r, 280 log_error_errno(r,
281 "Failed to reset audit login UID. This probably means that your kernel is too\n" 281 "Failed to reset audit login UID. This probably means that your kernel is too\n"
282@@ -3665,13 +3665,13 @@ static int setup_uid_map(pid_t pid) { 282@@ -3726,13 +3726,13 @@ static int setup_uid_map(pid_t pid) {
283 283
284 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 284 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
285 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); 285 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
@@ -295,11 +295,11 @@ index 734dee1130e0..71add9a055d2 100644
295 if (r < 0) 295 if (r < 0)
296 return log_error_errno(r, "Failed to write GID map: %m"); 296 return log_error_errno(r, "Failed to write GID map: %m");
297 297
298diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c 298Index: systemd-stable/src/shared/cgroup-setup.c
299index e8398cbde5ba..ba682ec0c9e7 100644 299===================================================================
300--- a/src/shared/cgroup-setup.c 300--- systemd-stable.orig/src/shared/cgroup-setup.c
301+++ b/src/shared/cgroup-setup.c 301+++ systemd-stable/src/shared/cgroup-setup.c
302@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { 302@@ -267,7 +267,7 @@ int cg_attach(const char *controller, co
303 303
304 xsprintf(c, PID_FMT "\n", pid); 304 xsprintf(c, PID_FMT "\n", pid);
305 305
@@ -317,11 +317,11 @@ index e8398cbde5ba..ba682ec0c9e7 100644
317 if (r < 0) { 317 if (r < 0) {
318 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", 318 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
319 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); 319 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
320diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c 320Index: systemd-stable/src/shared/sysctl-util.c
321index 8543dbd2d05f..76162599817e 100644 321===================================================================
322--- a/src/shared/sysctl-util.c 322--- systemd-stable.orig/src/shared/sysctl-util.c
323+++ b/src/shared/sysctl-util.c 323+++ systemd-stable/src/shared/sysctl-util.c
324@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c 324@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, con
325 325
326 log_debug("Setting '%s' to '%s'", p, value); 326 log_debug("Setting '%s' to '%s'", p, value);
327 327
@@ -330,11 +330,11 @@ index 8543dbd2d05f..76162599817e 100644
330 } 330 }
331 331
332 int sysctl_read(const char *property, char **content) { 332 int sysctl_read(const char *property, char **content) {
333diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c 333Index: systemd-stable/src/sleep/sleep.c
334index fbfddc0262fc..7cc2902154e9 100644 334===================================================================
335--- a/src/sleep/sleep.c 335--- systemd-stable.orig/src/sleep/sleep.c
336+++ b/src/sleep/sleep.c 336+++ systemd-stable/src/sleep/sleep.c
337@@ -47,7 +47,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca 337@@ -48,7 +48,7 @@ static int write_hibernate_location_info
338 assert(hibernate_location->swap); 338 assert(hibernate_location->swap);
339 339
340 xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); 340 xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
@@ -343,7 +343,7 @@ index fbfddc0262fc..7cc2902154e9 100644
343 if (r < 0) 343 if (r < 0)
344 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", 344 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
345 hibernate_location->swap->device, resume_str); 345 hibernate_location->swap->device, resume_str);
346@@ -74,7 +74,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca 346@@ -75,7 +75,7 @@ static int write_hibernate_location_info
347 } 347 }
348 348
349 xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); 349 xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
@@ -352,7 +352,7 @@ index fbfddc0262fc..7cc2902154e9 100644
352 if (r < 0) 352 if (r < 0)
353 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", 353 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m",
354 hibernate_location->swap->device, offset_str); 354 hibernate_location->swap->device, offset_str);
355@@ -91,7 +91,7 @@ static int write_mode(char **modes) { 355@@ -92,7 +92,7 @@ static int write_mode(char **modes) {
356 STRV_FOREACH(mode, modes) { 356 STRV_FOREACH(mode, modes) {
357 int k; 357 int k;
358 358
@@ -361,7 +361,7 @@ index fbfddc0262fc..7cc2902154e9 100644
361 if (k >= 0) 361 if (k >= 0)
362 return 0; 362 return 0;
363 363
364@@ -110,7 +110,7 @@ static int write_state(FILE **f, char **states) { 364@@ -114,7 +114,7 @@ static int write_state(FILE **f, char **
365 STRV_FOREACH(state, states) { 365 STRV_FOREACH(state, states) {
366 int k; 366 int k;
367 367
@@ -370,11 +370,11 @@ index fbfddc0262fc..7cc2902154e9 100644
370 if (k >= 0) 370 if (k >= 0)
371 return 0; 371 return 0;
372 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); 372 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
373diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c 373Index: systemd-stable/src/udev/udevadm-trigger.c
374index 60c68b5029cf..fdca03d3d42c 100644 374===================================================================
375--- a/src/udev/udevadm-trigger.c 375--- systemd-stable.orig/src/udev/udevadm-trigger.c
376+++ b/src/udev/udevadm-trigger.c 376+++ systemd-stable/src/udev/udevadm-trigger.c
377@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se 377@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerato
378 if (!filename) 378 if (!filename)
379 return log_oom(); 379 return log_oom();
380 380
@@ -383,11 +383,11 @@ index 60c68b5029cf..fdca03d3d42c 100644
383 if (r < 0) { 383 if (r < 0) {
384 bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS); 384 bool ignore = IN_SET(r, -ENOENT, -EACCES, -ENODEV, -EROFS);
385 385
386diff --git a/src/udev/udevd.c b/src/udev/udevd.c 386Index: systemd-stable/src/udev/udevd.c
387index ca65474f2763..38780681431a 100644 387===================================================================
388--- a/src/udev/udevd.c 388--- systemd-stable.orig/src/udev/udevd.c
389+++ b/src/udev/udevd.c 389+++ systemd-stable/src/udev/udevd.c
390@@ -1089,7 +1089,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) { 390@@ -1153,7 +1153,7 @@ static int synthesize_change_one(sd_devi
391 391
392 filename = strjoina(syspath, "/uevent"); 392 filename = strjoina(syspath, "/uevent");
393 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath); 393 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
@@ -396,11 +396,11 @@ index ca65474f2763..38780681431a 100644
396 if (r < 0) 396 if (r < 0)
397 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename); 397 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
398 return 0; 398 return 0;
399diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c 399Index: systemd-stable/src/vconsole/vconsole-setup.c
400index 9d706085fb47..30dcfa86f4d0 100644 400===================================================================
401--- a/src/vconsole/vconsole-setup.c 401--- systemd-stable.orig/src/vconsole/vconsole-setup.c
402+++ b/src/vconsole/vconsole-setup.c 402+++ systemd-stable/src/vconsole/vconsole-setup.c
403@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { 403@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *na
404 static int toggle_utf8_sysfs(bool utf8) { 404 static int toggle_utf8_sysfs(bool utf8) {
405 int r; 405 int r;
406 406
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 a5e41bfabf..30fe9a14df 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
@@ -17,13 +17,13 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
17 src/shared/format-table.c | 36 ++++++++++++++++++++---------- 17 src/shared/format-table.c | 36 ++++++++++++++++++++----------
18 3 files changed, 38 insertions(+), 31 deletions(-) 18 3 files changed, 38 insertions(+), 31 deletions(-)
19 19
20diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h 20Index: systemd-stable/src/basic/sort-util.h
21index e029f8646eb0..27d68b341cf3 100644 21===================================================================
22--- a/src/basic/sort-util.h 22--- systemd-stable.orig/src/basic/sort-util.h
23+++ b/src/basic/sort-util.h 23+++ systemd-stable/src/basic/sort-util.h
24@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn 24@@ -54,17 +54,3 @@ static inline void _qsort_safe(void *bas
25 int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ 25 int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
26 qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ 26 _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
27 }) 27 })
28- 28-
29-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { 29-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
@@ -39,11 +39,11 @@ index e029f8646eb0..27d68b341cf3 100644
39- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ 39- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
40- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ 40- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
41- }) 41- })
42diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c 42Index: systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c
43index d790e8fd0b19..42e0fd7c9b3c 100644 43===================================================================
44--- a/src/libsystemd/sd-hwdb/hwdb-util.c 44--- systemd-stable.orig/src/libsystemd/sd-hwdb/hwdb-util.c
45+++ b/src/libsystemd/sd-hwdb/hwdb-util.c 45+++ systemd-stable/src/libsystemd/sd-hwdb/hwdb-util.c
46@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) { 46@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie)
47 47
48 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); 48 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
49 49
@@ -60,7 +60,7 @@ index d790e8fd0b19..42e0fd7c9b3c 100644
60 } 60 }
61 61
62 static int trie_node_add_value(struct trie *trie, struct trie_node *node, 62 static int trie_node_add_value(struct trie *trie, struct trie_node *node,
63@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, 63@@ -158,7 +162,10 @@ static int trie_node_add_value(struct tr
64 .value_off = v, 64 .value_off = v,
65 }; 65 };
66 66
@@ -72,7 +72,7 @@ index d790e8fd0b19..42e0fd7c9b3c 100644
72 if (val) { 72 if (val) {
73 /* At this point we have 2 identical properties on the same match-string. 73 /* At this point we have 2 identical properties on the same match-string.
74 * Since we process files in order, we just replace the previous value. */ 74 * Since we process files in order, we just replace the previous value. */
75@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, 75@@ -184,7 +191,9 @@ static int trie_node_add_value(struct tr
76 .line_number = line_number, 76 .line_number = line_number,
77 }; 77 };
78 node->values_count++; 78 node->values_count++;
@@ -83,11 +83,11 @@ index d790e8fd0b19..42e0fd7c9b3c 100644
83 return 0; 83 return 0;
84 } 84 }
85 85
86diff --git a/src/shared/format-table.c b/src/shared/format-table.c 86Index: systemd-stable/src/shared/format-table.c
87index 425013046491..33c1c5a12d43 100644 87===================================================================
88--- a/src/shared/format-table.c 88--- systemd-stable.orig/src/shared/format-table.c
89+++ b/src/shared/format-table.c 89+++ systemd-stable/src/shared/format-table.c
90@@ -1164,31 +1164,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t 90@@ -1246,31 +1246,33 @@ static int cell_data_compare(TableData *
91 return CMP(index_a, index_b); 91 return CMP(index_a, index_b);
92 } 92 }
93 93
@@ -131,7 +131,7 @@ index 425013046491..33c1c5a12d43 100644
131 } 131 }
132 132
133 /* Order identical lines by the order there were originally added in */ 133 /* Order identical lines by the order there were originally added in */
134@@ -1690,7 +1692,12 @@ int table_print(Table *t, FILE *f) { 134@@ -1798,7 +1800,12 @@ int table_print(Table *t, FILE *f) {
135 for (i = 0; i < n_rows; i++) 135 for (i = 0; i < n_rows; i++)
136 sorted[i] = i * t->n_columns; 136 sorted[i] = i * t->n_columns;
137 137
@@ -145,7 +145,7 @@ index 425013046491..33c1c5a12d43 100644
145 } 145 }
146 146
147 if (t->display_map) 147 if (t->display_map)
148@@ -2236,7 +2243,12 @@ int table_to_json(Table *t, JsonVariant **ret) { 148@@ -2375,7 +2382,12 @@ int table_to_json(Table *t, JsonVariant
149 for (i = 0; i < n_rows; i++) 149 for (i = 0; i < n_rows; i++)
150 sorted[i] = i * t->n_columns; 150 sorted[i] = i * t->n_columns;
151 151
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
index 0dea933270..e65c543614 100644
--- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
+++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -22,11 +22,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22 create mode 100644 src/basic/parse-printf-format.c 22 create mode 100644 src/basic/parse-printf-format.c
23 create mode 100644 src/basic/parse-printf-format.h 23 create mode 100644 src/basic/parse-printf-format.h
24 24
25diff --git a/meson.build b/meson.build 25Index: systemd-stable/meson.build
26index fc216d22da24..a25996803d64 100644 26===================================================================
27--- a/meson.build 27--- systemd-stable.orig/meson.build
28+++ b/meson.build 28+++ systemd-stable/meson.build
29@@ -640,6 +640,7 @@ endif 29@@ -638,6 +638,7 @@ endif
30 foreach header : ['crypt.h', 30 foreach header : ['crypt.h',
31 'linux/memfd.h', 31 'linux/memfd.h',
32 'linux/vm_sockets.h', 32 'linux/vm_sockets.h',
@@ -34,11 +34,11 @@ index fc216d22da24..a25996803d64 100644
34 'sys/auxv.h', 34 'sys/auxv.h',
35 'valgrind/memcheck.h', 35 'valgrind/memcheck.h',
36 'valgrind/valgrind.h', 36 'valgrind/valgrind.h',
37diff --git a/src/basic/meson.build b/src/basic/meson.build 37Index: systemd-stable/src/basic/meson.build
38index ccb22e159505..25c77ea6bc0e 100644 38===================================================================
39--- a/src/basic/meson.build 39--- systemd-stable.orig/src/basic/meson.build
40+++ b/src/basic/meson.build 40+++ systemd-stable/src/basic/meson.build
41@@ -313,6 +313,11 @@ foreach item : [['af', af_list_txt, 'af', ''], 41@@ -317,6 +317,11 @@ foreach item : [['af', af_list_txt,
42 endforeach 42 endforeach
43 43
44 basic_sources += generated_gperf_headers 44 basic_sources += generated_gperf_headers
@@ -50,11 +50,10 @@ index ccb22e159505..25c77ea6bc0e 100644
50 basic_gcrypt_sources = files( 50 basic_gcrypt_sources = files(
51 'gcrypt-util.c', 51 'gcrypt-util.c',
52 'gcrypt-util.h') 52 'gcrypt-util.h')
53diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c 53Index: systemd-stable/src/basic/parse-printf-format.c
54new file mode 100644 54===================================================================
55index 000000000000..49437e544540
56--- /dev/null 55--- /dev/null
57+++ b/src/basic/parse-printf-format.c 56+++ systemd-stable/src/basic/parse-printf-format.c
58@@ -0,0 +1,273 @@ 57@@ -0,0 +1,273 @@
59+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ 58+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
60+ 59+
@@ -329,11 +328,10 @@ index 000000000000..49437e544540
329+ 328+
330+ return last; 329+ return last;
331+} 330+}
332diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h 331Index: systemd-stable/src/basic/parse-printf-format.h
333new file mode 100644 332===================================================================
334index 000000000000..47be7522d7fa
335--- /dev/null 333--- /dev/null
336+++ b/src/basic/parse-printf-format.h 334+++ systemd-stable/src/basic/parse-printf-format.h
337@@ -0,0 +1,57 @@ 335@@ -0,0 +1,57 @@
338+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ 336+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
339+ 337+
@@ -392,10 +390,10 @@ index 000000000000..47be7522d7fa
392+size_t parse_printf_format(const char *fmt, size_t n, int *types); 390+size_t parse_printf_format(const char *fmt, size_t n, int *types);
393+ 391+
394+#endif /* HAVE_PRINTF_H */ 392+#endif /* HAVE_PRINTF_H */
395diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h 393Index: systemd-stable/src/basic/stdio-util.h
396index c3b9448d4f4f..2937aa13b178 100644 394===================================================================
397--- a/src/basic/stdio-util.h 395--- systemd-stable.orig/src/basic/stdio-util.h
398+++ b/src/basic/stdio-util.h 396+++ systemd-stable/src/basic/stdio-util.h
399@@ -1,13 +1,13 @@ 397@@ -1,13 +1,13 @@
400 /* SPDX-License-Identifier: LGPL-2.1+ */ 398 /* SPDX-License-Identifier: LGPL-2.1+ */
401 #pragma once 399 #pragma once
@@ -411,10 +409,10 @@ index c3b9448d4f4f..2937aa13b178 100644
411 409
412 #define snprintf_ok(buf, len, fmt, ...) \ 410 #define snprintf_ok(buf, len, fmt, ...) \
413 ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) 411 ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
414diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c 412Index: systemd-stable/src/journal/journal-send.c
415index 912ecef73cce..43ed756bda53 100644 413===================================================================
416--- a/src/journal/journal-send.c 414--- systemd-stable.orig/src/journal/journal-send.c
417+++ b/src/journal/journal-send.c 415+++ systemd-stable/src/journal/journal-send.c
418@@ -2,7 +2,6 @@ 416@@ -2,7 +2,6 @@
419 417
420 #include <errno.h> 418 #include <errno.h>
@@ -423,7 +421,7 @@ index 912ecef73cce..43ed756bda53 100644
423 #include <stddef.h> 421 #include <stddef.h>
424 #include <sys/un.h> 422 #include <sys/un.h>
425 #include <unistd.h> 423 #include <unistd.h>
426@@ -20,6 +19,7 @@ 424@@ -21,6 +20,7 @@
427 #include "stdio-util.h" 425 #include "stdio-util.h"
428 #include "string-util.h" 426 #include "string-util.h"
429 #include "tmpfile-util.h" 427 #include "tmpfile-util.h"
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 ca4f0d5d62..8e7a2fb6e4 100644
--- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -1,4 +1,4 @@
1From 85dcaad8f38521ec3dc580794072b601900eed84 Mon Sep 17 00:00:00 2001 1From 7e771de87cf728a8678f1f28f391bba3589e2496 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 14:18:21 +0800 3Date: Mon, 25 Feb 2019 14:18:21 +0800
4Subject: [PATCH] src/basic/missing.h: check for missing strndupa 4Subject: [PATCH] src/basic/missing.h: check for missing strndupa
@@ -25,6 +25,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
25 src/basic/missing_stdlib.h | 12 ++++++++++++ 25 src/basic/missing_stdlib.h | 12 ++++++++++++
26 src/basic/mkdir.c | 1 + 26 src/basic/mkdir.c | 1 +
27 src/basic/parse-util.c | 1 + 27 src/basic/parse-util.c | 1 +
28 src/basic/path-lookup.c | 1 +
28 src/basic/proc-cmdline.c | 1 + 29 src/basic/proc-cmdline.c | 1 +
29 src/basic/procfs-util.c | 1 + 30 src/basic/procfs-util.c | 1 +
30 src/basic/selinux-util.c | 1 + 31 src/basic/selinux-util.c | 1 +
@@ -52,6 +53,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
52 src/nss-mymachines/nss-mymachines.c | 1 + 53 src/nss-mymachines/nss-mymachines.c | 1 +
53 src/portable/portable.c | 1 + 54 src/portable/portable.c | 1 +
54 src/resolve/resolvectl.c | 1 + 55 src/resolve/resolvectl.c | 1 +
56 src/shared/bus-get-properties.c | 1 +
55 src/shared/bus-unit-procs.c | 1 + 57 src/shared/bus-unit-procs.c | 1 +
56 src/shared/bus-unit-util.c | 1 + 58 src/shared/bus-unit-util.c | 1 +
57 src/shared/bus-util.c | 1 + 59 src/shared/bus-util.c | 1 +
@@ -59,20 +61,19 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
59 src/shared/journal-importer.c | 1 + 61 src/shared/journal-importer.c | 1 +
60 src/shared/logs-show.c | 1 + 62 src/shared/logs-show.c | 1 +
61 src/shared/pager.c | 1 + 63 src/shared/pager.c | 1 +
62 src/shared/path-lookup.c | 1 +
63 src/shared/uid-range.c | 1 + 64 src/shared/uid-range.c | 1 +
64 src/socket-proxy/socket-proxyd.c | 1 + 65 src/socket-proxy/socket-proxyd.c | 1 +
65 src/test/test-hexdecoct.c | 1 + 66 src/test/test-hexdecoct.c | 1 +
66 src/udev/udev-builtin-path_id.c | 1 + 67 src/udev/udev-builtin-path_id.c | 1 +
67 src/udev/udev-event.c | 1 + 68 src/udev/udev-event.c | 1 +
68 src/udev/udev-rules.c | 1 + 69 src/udev/udev-rules.c | 1 +
69 49 files changed, 60 insertions(+) 70 50 files changed, 61 insertions(+)
70 71
71diff --git a/meson.build b/meson.build 72diff --git a/meson.build b/meson.build
72index a25996803d64..72b305b5ab58 100644 73index 9187439bdd..bea9935a91 100644
73--- a/meson.build 74--- a/meson.build
74+++ b/meson.build 75+++ b/meson.build
75@@ -529,6 +529,7 @@ foreach ident : [ 76@@ -527,6 +527,7 @@ foreach ident : [
76 #include <unistd.h> 77 #include <unistd.h>
77 #include <signal.h> 78 #include <signal.h>
78 #include <sys/wait.h>'''], 79 #include <sys/wait.h>'''],
@@ -81,7 +82,7 @@ index a25996803d64..72b305b5ab58 100644
81 82
82 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') 83 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
83diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c 84diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
84index 048441429025..01d74ea0ed4e 100644 85index 3a644363e1..73946a829b 100644
85--- a/src/backlight/backlight.c 86--- a/src/backlight/backlight.c
86+++ b/src/backlight/backlight.c 87+++ b/src/backlight/backlight.c
87@@ -17,6 +17,7 @@ 88@@ -17,6 +17,7 @@
@@ -93,19 +94,19 @@ index 048441429025..01d74ea0ed4e 100644
93 static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { 94 static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
94 const char *subsystem, *sysname, *value; 95 const char *subsystem, *sysname, *value;
95diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c 96diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
96index 54fc6ecf8b20..a5141f4cbedd 100644 97index e94fcfad02..856a7068b0 100644
97--- a/src/basic/cgroup-util.c 98--- a/src/basic/cgroup-util.c
98+++ b/src/basic/cgroup-util.c 99+++ b/src/basic/cgroup-util.c
99@@ -37,6 +37,7 @@ 100@@ -38,6 +38,7 @@
100 #include "strv.h"
101 #include "unit-name.h" 101 #include "unit-name.h"
102 #include "user-util.h" 102 #include "user-util.h"
103 #include "xattr-util.h"
103+#include "missing_stdlib.h" 104+#include "missing_stdlib.h"
104 105
105 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { 106 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
106 _cleanup_free_ char *fs = NULL; 107 _cleanup_free_ char *fs = NULL;
107diff --git a/src/basic/env-util.c b/src/basic/env-util.c 108diff --git a/src/basic/env-util.c b/src/basic/env-util.c
108index b8dc98915f81..5049b37594bc 100644 109index b8dc98915f..5049b37594 100644
109--- a/src/basic/env-util.c 110--- a/src/basic/env-util.c
110+++ b/src/basic/env-util.c 111+++ b/src/basic/env-util.c
111@@ -15,6 +15,7 @@ 112@@ -15,6 +15,7 @@
@@ -117,10 +118,10 @@ index b8dc98915f81..5049b37594bc 100644
117 #define VALID_CHARS_ENV_NAME \ 118 #define VALID_CHARS_ENV_NAME \
118 DIGITS LETTERS \ 119 DIGITS LETTERS \
119diff --git a/src/basic/log.c b/src/basic/log.c 120diff --git a/src/basic/log.c b/src/basic/log.c
120index 17557e1844b2..6cec4d324aab 100644 121index c6fe203808..b7ef932d28 100644
121--- a/src/basic/log.c 122--- a/src/basic/log.c
122+++ b/src/basic/log.c 123+++ b/src/basic/log.c
123@@ -34,6 +34,7 @@ 124@@ -35,6 +35,7 @@
124 #include "terminal-util.h" 125 #include "terminal-util.h"
125 #include "time-util.h" 126 #include "time-util.h"
126 #include "utf8.h" 127 #include "utf8.h"
@@ -129,7 +130,7 @@ index 17557e1844b2..6cec4d324aab 100644
129 #define SNDBUF_SIZE (8*1024*1024) 130 #define SNDBUF_SIZE (8*1024*1024)
130 131
131diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h 132diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
132index 188a8d44066a..1e16ec287aad 100644 133index 188a8d4406..1e16ec287a 100644
133--- a/src/basic/missing_stdlib.h 134--- a/src/basic/missing_stdlib.h
134+++ b/src/basic/missing_stdlib.h 135+++ b/src/basic/missing_stdlib.h
135@@ -11,3 +11,15 @@ 136@@ -11,3 +11,15 @@
@@ -149,7 +150,7 @@ index 188a8d44066a..1e16ec287aad 100644
149+ }) 150+ })
150+#endif 151+#endif
151diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c 152diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
152index fa682d4c438e..37902551490a 100644 153index 6ebc2b95fd..88f4359bab 100644
153--- a/src/basic/mkdir.c 154--- a/src/basic/mkdir.c
154+++ b/src/basic/mkdir.c 155+++ b/src/basic/mkdir.c
155@@ -13,6 +13,7 @@ 156@@ -13,6 +13,7 @@
@@ -158,22 +159,34 @@ index fa682d4c438e..37902551490a 100644
158 #include "user-util.h" 159 #include "user-util.h"
159+#include "missing_stdlib.h" 160+#include "missing_stdlib.h"
160 161
161 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) { 162 int mkdir_safe_internal(
162 struct stat st; 163 const char *path,
163diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c 164diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
164index e0094b0f370a..00da6518124b 100644 165index 44f0438cf4..54b4133343 100644
165--- a/src/basic/parse-util.c 166--- a/src/basic/parse-util.c
166+++ b/src/basic/parse-util.c 167+++ b/src/basic/parse-util.c
167@@ -18,6 +18,7 @@ 168@@ -19,6 +19,7 @@
168 #include "process-util.h"
169 #include "stat-util.h" 169 #include "stat-util.h"
170 #include "string-util.h" 170 #include "string-util.h"
171 #include "strv.h"
171+#include "missing_stdlib.h" 172+#include "missing_stdlib.h"
172 173
173 int parse_boolean(const char *v) { 174 int parse_boolean(const char *v) {
174 if (!v) 175 if (!v)
176diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
177index 52968dee34..2f4f7e3dcd 100644
178--- a/src/basic/path-lookup.c
179+++ b/src/basic/path-lookup.c
180@@ -15,6 +15,7 @@
181 #include "strv.h"
182 #include "tmpfile-util.h"
183 #include "user-util.h"
184+#include "missing_stdlib.h"
185
186 int xdg_user_runtime_dir(char **ret, const char *suffix) {
187 const char *e;
175diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c 188diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
176index 1af58717c686..c1020f4611d4 100644 189index ba47ca5812..8baf728fde 100644
177--- a/src/basic/proc-cmdline.c 190--- a/src/basic/proc-cmdline.c
178+++ b/src/basic/proc-cmdline.c 191+++ b/src/basic/proc-cmdline.c
179@@ -15,6 +15,7 @@ 192@@ -15,6 +15,7 @@
@@ -185,7 +198,7 @@ index 1af58717c686..c1020f4611d4 100644
185 int proc_cmdline(char **ret) { 198 int proc_cmdline(char **ret) {
186 const char *e; 199 const char *e;
187diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c 200diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
188index 7aaf95bfced2..da7e836f143e 100644 201index 7aaf95bfce..da7e836f14 100644
189--- a/src/basic/procfs-util.c 202--- a/src/basic/procfs-util.c
190+++ b/src/basic/procfs-util.c 203+++ b/src/basic/procfs-util.c
191@@ -11,6 +11,7 @@ 204@@ -11,6 +11,7 @@
@@ -197,10 +210,10 @@ index 7aaf95bfced2..da7e836f143e 100644
197 int procfs_tasks_get_limit(uint64_t *ret) { 210 int procfs_tasks_get_limit(uint64_t *ret) {
198 _cleanup_free_ char *value = NULL; 211 _cleanup_free_ char *value = NULL;
199diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c 212diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c
200index 1095cb426cce..806ef4bd97a9 100644 213index c94ee26bd9..14e35b4653 100644
201--- a/src/basic/selinux-util.c 214--- a/src/basic/selinux-util.c
202+++ b/src/basic/selinux-util.c 215+++ b/src/basic/selinux-util.c
203@@ -26,6 +26,7 @@ 216@@ -27,6 +27,7 @@
204 #include "selinux-util.h" 217 #include "selinux-util.h"
205 #include "stdio-util.h" 218 #include "stdio-util.h"
206 #include "time-util.h" 219 #include "time-util.h"
@@ -209,7 +222,7 @@ index 1095cb426cce..806ef4bd97a9 100644
209 #if HAVE_SELINUX 222 #if HAVE_SELINUX
210 DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); 223 DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free);
211diff --git a/src/basic/time-util.c b/src/basic/time-util.c 224diff --git a/src/basic/time-util.c b/src/basic/time-util.c
212index 105584e2e72f..eb0bed47dac3 100644 225index 15cc1b8851..02bb3f01f9 100644
213--- a/src/basic/time-util.c 226--- a/src/basic/time-util.c
214+++ b/src/basic/time-util.c 227+++ b/src/basic/time-util.c
215@@ -26,6 +26,7 @@ 228@@ -26,6 +26,7 @@
@@ -221,7 +234,7 @@ index 105584e2e72f..eb0bed47dac3 100644
221 static clockid_t map_clock_id(clockid_t c) { 234 static clockid_t map_clock_id(clockid_t c) {
222 235
223diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c 236diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
224index b96e1f927fff..cba979baca3e 100644 237index b96e1f927f..cba979baca 100644
225--- a/src/boot/bless-boot.c 238--- a/src/boot/bless-boot.c
226+++ b/src/boot/bless-boot.c 239+++ b/src/boot/bless-boot.c
227@@ -18,6 +18,7 @@ 240@@ -18,6 +18,7 @@
@@ -233,7 +246,7 @@ index b96e1f927fff..cba979baca3e 100644
233 static char **arg_path = NULL; 246 static char **arg_path = NULL;
234 247
235diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c 248diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
236index 27dc9e43c3e2..b1a83023600b 100644 249index b7d2e32639..fdbc1df95e 100644
237--- a/src/core/dbus-cgroup.c 250--- a/src/core/dbus-cgroup.c
238+++ b/src/core/dbus-cgroup.c 251+++ b/src/core/dbus-cgroup.c
239@@ -15,6 +15,7 @@ 252@@ -15,6 +15,7 @@
@@ -245,7 +258,7 @@ index 27dc9e43c3e2..b1a83023600b 100644
245 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); 258 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
246 259
247diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c 260diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
248index d8ba3e5d9241..729e13fda64c 100644 261index 50f7ada8ce..5c760ee487 100644
249--- a/src/core/dbus-execute.c 262--- a/src/core/dbus-execute.c
250+++ b/src/core/dbus-execute.c 263+++ b/src/core/dbus-execute.c
251@@ -41,6 +41,7 @@ 264@@ -41,6 +41,7 @@
@@ -257,7 +270,7 @@ index d8ba3e5d9241..729e13fda64c 100644
257 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); 270 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
258 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); 271 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
259diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c 272diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
260index 7862beaacb6d..3b1ea53a5f0d 100644 273index 951450e53d..50d134e9a1 100644
261--- a/src/core/dbus-util.c 274--- a/src/core/dbus-util.c
262+++ b/src/core/dbus-util.c 275+++ b/src/core/dbus-util.c
263@@ -7,6 +7,7 @@ 276@@ -7,6 +7,7 @@
@@ -269,10 +282,10 @@ index 7862beaacb6d..3b1ea53a5f0d 100644
269 int bus_property_get_triggered_unit( 282 int bus_property_get_triggered_unit(
270 sd_bus *bus, 283 sd_bus *bus,
271diff --git a/src/core/execute.c b/src/core/execute.c 284diff --git a/src/core/execute.c b/src/core/execute.c
272index 89dbf6fbd2c1..9762dc57443c 100644 285index 2a4840a3a9..d3f1e0e0f8 100644
273--- a/src/core/execute.c 286--- a/src/core/execute.c
274+++ b/src/core/execute.c 287+++ b/src/core/execute.c
275@@ -88,6 +88,7 @@ 288@@ -89,6 +89,7 @@
276 #include "unit.h" 289 #include "unit.h"
277 #include "user-util.h" 290 #include "user-util.h"
278 #include "utmp-wtmp.h" 291 #include "utmp-wtmp.h"
@@ -281,7 +294,7 @@ index 89dbf6fbd2c1..9762dc57443c 100644
281 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) 294 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
282 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) 295 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
283diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c 296diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
284index 09ccd613e32c..f4e64fa283e9 100644 297index 09ccd613e3..f4e64fa283 100644
285--- a/src/core/kmod-setup.c 298--- a/src/core/kmod-setup.c
286+++ b/src/core/kmod-setup.c 299+++ b/src/core/kmod-setup.c
287@@ -11,6 +11,7 @@ 300@@ -11,6 +11,7 @@
@@ -293,7 +306,7 @@ index 09ccd613e32c..f4e64fa283e9 100644
293 #if HAVE_KMOD 306 #if HAVE_KMOD
294 #include "module-util.h" 307 #include "module-util.h"
295diff --git a/src/core/service.c b/src/core/service.c 308diff --git a/src/core/service.c b/src/core/service.c
296index 17f27a4abce3..e5dcc532d0ce 100644 309index 00e61945ba..1ecab28354 100644
297--- a/src/core/service.c 310--- a/src/core/service.c
298+++ b/src/core/service.c 311+++ b/src/core/service.c
299@@ -41,6 +41,7 @@ 312@@ -41,6 +41,7 @@
@@ -305,7 +318,7 @@ index 17f27a4abce3..e5dcc532d0ce 100644
305 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { 318 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
306 [SERVICE_DEAD] = UNIT_INACTIVE, 319 [SERVICE_DEAD] = UNIT_INACTIVE,
307diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c 320diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
308index 35885dfb47c4..bb9f0660a6a0 100644 321index 35885dfb47..bb9f0660a6 100644
309--- a/src/coredump/coredump-vacuum.c 322--- a/src/coredump/coredump-vacuum.c
310+++ b/src/coredump/coredump-vacuum.c 323+++ b/src/coredump/coredump-vacuum.c
311@@ -16,6 +16,7 @@ 324@@ -16,6 +16,7 @@
@@ -317,7 +330,7 @@ index 35885dfb47c4..bb9f0660a6a0 100644
317 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ 330 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
318 #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ 331 #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
319diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c 332diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
320index 88e42d3a984b..0f08376e5399 100644 333index 77dfdefd64..e21ecbeff8 100644
321--- a/src/journal-remote/journal-remote-main.c 334--- a/src/journal-remote/journal-remote-main.c
322+++ b/src/journal-remote/journal-remote-main.c 335+++ b/src/journal-remote/journal-remote-main.c
323@@ -22,6 +22,7 @@ 336@@ -22,6 +22,7 @@
@@ -329,7 +342,7 @@ index 88e42d3a984b..0f08376e5399 100644
329 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" 342 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
330 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" 343 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
331diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c 344diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
332index e5feec83bce6..c3aec1e219d7 100644 345index 8d4897b942..15476b3c83 100644
333--- a/src/journal/journalctl.c 346--- a/src/journal/journalctl.c
334+++ b/src/journal/journalctl.c 347+++ b/src/journal/journalctl.c
335@@ -69,6 +69,7 @@ 348@@ -69,6 +69,7 @@
@@ -341,7 +354,7 @@ index e5feec83bce6..c3aec1e219d7 100644
341 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) 354 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
342 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ 355 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */
343diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c 356diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
344index 3fa98dfda237..e655d77e714a 100644 357index 6fb0abb419..2d94d9938e 100644
345--- a/src/journal/sd-journal.c 358--- a/src/journal/sd-journal.c
346+++ b/src/journal/sd-journal.c 359+++ b/src/journal/sd-journal.c
347@@ -40,6 +40,7 @@ 360@@ -40,6 +40,7 @@
@@ -353,7 +366,7 @@ index 3fa98dfda237..e655d77e714a 100644
353 #define JOURNAL_FILES_MAX 7168 366 #define JOURNAL_FILES_MAX 7168
354 367
355diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c 368diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
356index 73127dfe0253..cc8635dea591 100644 369index 55e35cd902..0ed98f9224 100644
357--- a/src/libsystemd/sd-bus/bus-message.c 370--- a/src/libsystemd/sd-bus/bus-message.c
358+++ b/src/libsystemd/sd-bus/bus-message.c 371+++ b/src/libsystemd/sd-bus/bus-message.c
359@@ -21,6 +21,7 @@ 372@@ -21,6 +21,7 @@
@@ -365,7 +378,7 @@ index 73127dfe0253..cc8635dea591 100644
365 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); 378 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
366 379
367diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c 380diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
368index 6d140348ec4c..9126b8801bc5 100644 381index 6abac8822c..c74c9cd7fa 100644
369--- a/src/libsystemd/sd-bus/bus-objects.c 382--- a/src/libsystemd/sd-bus/bus-objects.c
370+++ b/src/libsystemd/sd-bus/bus-objects.c 383+++ b/src/libsystemd/sd-bus/bus-objects.c
371@@ -13,6 +13,7 @@ 384@@ -13,6 +13,7 @@
@@ -377,7 +390,7 @@ index 6d140348ec4c..9126b8801bc5 100644
377 static int node_vtable_get_userdata( 390 static int node_vtable_get_userdata(
378 sd_bus *bus, 391 sd_bus *bus,
379diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c 392diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
380index 18d30d010a20..be2ab703f8ed 100644 393index fc7e8e844a..7af4dd2712 100644
381--- a/src/libsystemd/sd-bus/bus-socket.c 394--- a/src/libsystemd/sd-bus/bus-socket.c
382+++ b/src/libsystemd/sd-bus/bus-socket.c 395+++ b/src/libsystemd/sd-bus/bus-socket.c
383@@ -28,6 +28,7 @@ 396@@ -28,6 +28,7 @@
@@ -389,7 +402,7 @@ index 18d30d010a20..be2ab703f8ed 100644
389 #define SNDBUF_SIZE (8*1024*1024) 402 #define SNDBUF_SIZE (8*1024*1024)
390 403
391diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c 404diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
392index 7ad03680f48d..b9d2181e4910 100644 405index 9de5e454a6..fe86c93c63 100644
393--- a/src/libsystemd/sd-bus/sd-bus.c 406--- a/src/libsystemd/sd-bus/sd-bus.c
394+++ b/src/libsystemd/sd-bus/sd-bus.c 407+++ b/src/libsystemd/sd-bus/sd-bus.c
395@@ -41,6 +41,7 @@ 408@@ -41,6 +41,7 @@
@@ -401,7 +414,7 @@ index 7ad03680f48d..b9d2181e4910 100644
401 #define log_debug_bus_message(m) \ 414 #define log_debug_bus_message(m) \
402 do { \ 415 do { \
403diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c 416diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
404index 8de0a859ee94..58044b6ba908 100644 417index 8de0a859ee..58044b6ba9 100644
405--- a/src/libsystemd/sd-bus/test-bus-benchmark.c 418--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
406+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c 419+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
407@@ -14,6 +14,7 @@ 420@@ -14,6 +14,7 @@
@@ -413,7 +426,7 @@ index 8de0a859ee94..58044b6ba908 100644
413 #define MAX_SIZE (2*1024*1024) 426 #define MAX_SIZE (2*1024*1024)
414 427
415diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c 428diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
416index 30669a9359e5..6544b3722099 100644 429index 233d081300..40a32b9700 100644
417--- a/src/locale/keymap-util.c 430--- a/src/locale/keymap-util.c
418+++ b/src/locale/keymap-util.c 431+++ b/src/locale/keymap-util.c
419@@ -21,6 +21,7 @@ 432@@ -21,6 +21,7 @@
@@ -425,7 +438,7 @@ index 30669a9359e5..6544b3722099 100644
425 static bool startswith_comma(const char *s, const char *prefix) { 438 static bool startswith_comma(const char *s, const char *prefix) {
426 s = startswith(s, prefix); 439 s = startswith(s, prefix);
427diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c 440diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
428index 84bea21ab7be..49720c7f742e 100644 441index 16f4289585..6c5e438b36 100644
429--- a/src/login/pam_systemd.c 442--- a/src/login/pam_systemd.c
430+++ b/src/login/pam_systemd.c 443+++ b/src/login/pam_systemd.c
431@@ -31,6 +31,7 @@ 444@@ -31,6 +31,7 @@
@@ -437,7 +450,7 @@ index 84bea21ab7be..49720c7f742e 100644
437 #include "parse-util.h" 450 #include "parse-util.h"
438 #include "path-util.h" 451 #include "path-util.h"
439diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c 452diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
440index bed1e42697c4..e4847c2beea2 100644 453index bed1e42697..e4847c2bee 100644
441--- a/src/network/generator/network-generator.c 454--- a/src/network/generator/network-generator.c
442+++ b/src/network/generator/network-generator.c 455+++ b/src/network/generator/network-generator.c
443@@ -13,6 +13,7 @@ 456@@ -13,6 +13,7 @@
@@ -449,7 +462,7 @@ index bed1e42697c4..e4847c2beea2 100644
449 /* 462 /*
450 # .network 463 # .network
451diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c 464diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
452index 5fb5b49bbcc3..785ccc2da307 100644 465index d341fa25aa..91646bc2c2 100644
453--- a/src/nspawn/nspawn-settings.c 466--- a/src/nspawn/nspawn-settings.c
454+++ b/src/nspawn/nspawn-settings.c 467+++ b/src/nspawn/nspawn-settings.c
455@@ -16,6 +16,7 @@ 468@@ -16,6 +16,7 @@
@@ -461,19 +474,19 @@ index 5fb5b49bbcc3..785ccc2da307 100644
461 Settings *settings_new(void) { 474 Settings *settings_new(void) {
462 Settings *s; 475 Settings *s;
463diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c 476diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
464index 364356da5622..47d4ea44e40f 100644 477index 5db0dcef76..681f8677e4 100644
465--- a/src/nss-mymachines/nss-mymachines.c 478--- a/src/nss-mymachines/nss-mymachines.c
466+++ b/src/nss-mymachines/nss-mymachines.c 479+++ b/src/nss-mymachines/nss-mymachines.c
467@@ -19,6 +19,7 @@ 480@@ -19,6 +19,7 @@
481 #include "nss-util.h"
468 #include "signal-util.h" 482 #include "signal-util.h"
469 #include "string-util.h" 483 #include "string-util.h"
470 #include "user-util.h"
471+#include "missing_stdlib.h" 484+#include "missing_stdlib.h"
472 485
473 NSS_GETHOSTBYNAME_PROTOTYPES(mymachines); 486 NSS_GETHOSTBYNAME_PROTOTYPES(mymachines);
474 NSS_GETPW_PROTOTYPES(mymachines); 487 NSS_GETPW_PROTOTYPES(mymachines);
475diff --git a/src/portable/portable.c b/src/portable/portable.c 488diff --git a/src/portable/portable.c b/src/portable/portable.c
476index e18826ab2685..d9f4b81d8937 100644 489index 3a1367ec2b..f29336cb1e 100644
477--- a/src/portable/portable.c 490--- a/src/portable/portable.c
478+++ b/src/portable/portable.c 491+++ b/src/portable/portable.c
479@@ -31,6 +31,7 @@ 492@@ -31,6 +31,7 @@
@@ -485,10 +498,10 @@ index e18826ab2685..d9f4b81d8937 100644
485 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile"); 498 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
486 499
487diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c 500diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
488index f20e8c44b8bc..9f6c4e8f49a7 100644 501index 3072b984e5..c46ae374bf 100644
489--- a/src/resolve/resolvectl.c 502--- a/src/resolve/resolvectl.c
490+++ b/src/resolve/resolvectl.c 503+++ b/src/resolve/resolvectl.c
491@@ -33,6 +33,7 @@ 504@@ -36,6 +36,7 @@
492 #include "strv.h" 505 #include "strv.h"
493 #include "terminal-util.h" 506 #include "terminal-util.h"
494 #include "verbs.h" 507 #include "verbs.h"
@@ -496,8 +509,20 @@ index f20e8c44b8bc..9f6c4e8f49a7 100644
496 509
497 static int arg_family = AF_UNSPEC; 510 static int arg_family = AF_UNSPEC;
498 static int arg_ifindex = 0; 511 static int arg_ifindex = 0;
512diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
513index 8ad4694046..da5082c02a 100644
514--- a/src/shared/bus-get-properties.c
515+++ b/src/shared/bus-get-properties.c
516@@ -3,6 +3,7 @@
517 #include "bus-get-properties.h"
518 #include "rlimit-util.h"
519 #include "string-util.h"
520+#include "missing_stdlib.h"
521
522 int bus_property_get_bool(
523 sd_bus *bus,
499diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c 524diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
500index b21fe393265f..af2640005c1d 100644 525index b21fe39326..af2640005c 100644
501--- a/src/shared/bus-unit-procs.c 526--- a/src/shared/bus-unit-procs.c
502+++ b/src/shared/bus-unit-procs.c 527+++ b/src/shared/bus-unit-procs.c
503@@ -10,6 +10,7 @@ 528@@ -10,6 +10,7 @@
@@ -509,10 +534,10 @@ index b21fe393265f..af2640005c1d 100644
509 struct CGroupInfo { 534 struct CGroupInfo {
510 char *cgroup_path; 535 char *cgroup_path;
511diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c 536diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
512index 28d85944a8a7..4743a84a417e 100644 537index f2652ed9a5..eb019fc89f 100644
513--- a/src/shared/bus-unit-util.c 538--- a/src/shared/bus-unit-util.c
514+++ b/src/shared/bus-unit-util.c 539+++ b/src/shared/bus-unit-util.c
515@@ -34,6 +34,7 @@ 540@@ -39,6 +39,7 @@
516 #include "unit-def.h" 541 #include "unit-def.h"
517 #include "user-util.h" 542 #include "user-util.h"
518 #include "utf8.h" 543 #include "utf8.h"
@@ -521,19 +546,19 @@ index 28d85944a8a7..4743a84a417e 100644
521 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { 546 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
522 assert(message); 547 assert(message);
523diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c 548diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
524index 8e6a6e2ce2de..0cbf4b1997df 100644 549index 77c1c62182..5cd31f3c15 100644
525--- a/src/shared/bus-util.c 550--- a/src/shared/bus-util.c
526+++ b/src/shared/bus-util.c 551+++ b/src/shared/bus-util.c
527@@ -30,6 +30,7 @@ 552@@ -22,6 +22,7 @@
553 #include "socket-util.h"
528 #include "stdio-util.h" 554 #include "stdio-util.h"
529 #include "strv.h" 555 /* #include "string-util.h" */
530 #include "user-util.h"
531+#include "missing_stdlib.h" 556+#include "missing_stdlib.h"
532 557
533 static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { 558 static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
534 sd_event *e = userdata; 559 sd_event *e = userdata;
535diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c 560diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
536index b812665315f6..8e68f7f8fc6c 100644 561index b812665315..8e68f7f8fc 100644
537--- a/src/shared/dns-domain.c 562--- a/src/shared/dns-domain.c
538+++ b/src/shared/dns-domain.c 563+++ b/src/shared/dns-domain.c
539@@ -23,6 +23,7 @@ 564@@ -23,6 +23,7 @@
@@ -545,7 +570,7 @@ index b812665315f6..8e68f7f8fc6c 100644
545 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { 570 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
546 const char *n; 571 const char *n;
547diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c 572diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
548index 7c4fc7021dec..3fbaf5a63969 100644 573index 7c4fc7021d..3fbaf5a639 100644
549--- a/src/shared/journal-importer.c 574--- a/src/shared/journal-importer.c
550+++ b/src/shared/journal-importer.c 575+++ b/src/shared/journal-importer.c
551@@ -14,6 +14,7 @@ 576@@ -14,6 +14,7 @@
@@ -557,19 +582,19 @@ index 7c4fc7021dec..3fbaf5a63969 100644
557 enum { 582 enum {
558 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ 583 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
559diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c 584diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
560index 2bfd0b60c26b..6a1bb3a0760f 100644 585index 899e894ab7..628854ac9c 100644
561--- a/src/shared/logs-show.c 586--- a/src/shared/logs-show.c
562+++ b/src/shared/logs-show.c 587+++ b/src/shared/logs-show.c
563@@ -39,6 +39,7 @@ 588@@ -41,6 +41,7 @@
564 #include "time-util.h"
565 #include "utf8.h" 589 #include "utf8.h"
566 #include "util.h" 590 #include "util.h"
591 #include "web-util.h"
567+#include "missing_stdlib.h" 592+#include "missing_stdlib.h"
568 593
569 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ 594 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
570 #define PRINT_LINE_THRESHOLD 3 595 #define PRINT_LINE_THRESHOLD 3
571diff --git a/src/shared/pager.c b/src/shared/pager.c 596diff --git a/src/shared/pager.c b/src/shared/pager.c
572index 1fe9db179176..67954b5cab93 100644 597index e03be6d23b..50e3d1f75c 100644
573--- a/src/shared/pager.c 598--- a/src/shared/pager.c
574+++ b/src/shared/pager.c 599+++ b/src/shared/pager.c
575@@ -23,6 +23,7 @@ 600@@ -23,6 +23,7 @@
@@ -580,20 +605,8 @@ index 1fe9db179176..67954b5cab93 100644
580 605
581 static pid_t pager_pid = 0; 606 static pid_t pager_pid = 0;
582 607
583diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
584index 5b1620974536..0e7cd1c2af12 100644
585--- a/src/shared/path-lookup.c
586+++ b/src/shared/path-lookup.c
587@@ -19,6 +19,7 @@
588 #include "tmpfile-util.h"
589 #include "user-util.h"
590 #include "util.h"
591+#include "missing_stdlib.h"
592
593 int xdg_user_runtime_dir(char **ret, const char *suffix) {
594 const char *e;
595diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c 608diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
596index 7cb7d8a477e9..8e7d7f9e7ca6 100644 609index 7cb7d8a477..8e7d7f9e7c 100644
597--- a/src/shared/uid-range.c 610--- a/src/shared/uid-range.c
598+++ b/src/shared/uid-range.c 611+++ b/src/shared/uid-range.c
599@@ -9,6 +9,7 @@ 612@@ -9,6 +9,7 @@
@@ -605,7 +618,7 @@ index 7cb7d8a477e9..8e7d7f9e7ca6 100644
605 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { 618 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
606 assert(range); 619 assert(range);
607diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c 620diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
608index 2ee6fc2f0a6a..4a9934f9c14d 100644 621index b461aead60..9941695ed9 100644
609--- a/src/socket-proxy/socket-proxyd.c 622--- a/src/socket-proxy/socket-proxyd.c
610+++ b/src/socket-proxy/socket-proxyd.c 623+++ b/src/socket-proxy/socket-proxyd.c
611@@ -26,6 +26,7 @@ 624@@ -26,6 +26,7 @@
@@ -617,7 +630,7 @@ index 2ee6fc2f0a6a..4a9934f9c14d 100644
617 #define BUFFER_SIZE (256 * 1024) 630 #define BUFFER_SIZE (256 * 1024)
618 631
619diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c 632diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
620index 52217429b154..70708dedf318 100644 633index 52217429b1..70708dedf3 100644
621--- a/src/test/test-hexdecoct.c 634--- a/src/test/test-hexdecoct.c
622+++ b/src/test/test-hexdecoct.c 635+++ b/src/test/test-hexdecoct.c
623@@ -6,6 +6,7 @@ 636@@ -6,6 +6,7 @@
@@ -629,7 +642,7 @@ index 52217429b154..70708dedf318 100644
629 static void test_hexchar(void) { 642 static void test_hexchar(void) {
630 assert_se(hexchar(0xa) == 'a'); 643 assert_se(hexchar(0xa) == 'a');
631diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c 644diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
632index ca38f5608791..9d8cf4d2807b 100644 645index 6c020ac0ed..10723ec46c 100644
633--- a/src/udev/udev-builtin-path_id.c 646--- a/src/udev/udev-builtin-path_id.c
634+++ b/src/udev/udev-builtin-path_id.c 647+++ b/src/udev/udev-builtin-path_id.c
635@@ -22,6 +22,7 @@ 648@@ -22,6 +22,7 @@
@@ -641,7 +654,7 @@ index ca38f5608791..9d8cf4d2807b 100644
641 _printf_(2,3) 654 _printf_(2,3)
642 static void path_prepend(char **path, const char *fmt, ...) { 655 static void path_prepend(char **path, const char *fmt, ...) {
643diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c 656diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
644index eb51139e519c..977cc16e9d7c 100644 657index e1c2baf7f2..62d4086802 100644
645--- a/src/udev/udev-event.c 658--- a/src/udev/udev-event.c
646+++ b/src/udev/udev-event.c 659+++ b/src/udev/udev-event.c
647@@ -34,6 +34,7 @@ 660@@ -34,6 +34,7 @@
@@ -653,7 +666,7 @@ index eb51139e519c..977cc16e9d7c 100644
653 typedef struct Spawn { 666 typedef struct Spawn {
654 sd_device *device; 667 sd_device *device;
655diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c 668diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
656index b9b350d1ef7a..2c114cc77572 100644 669index c36f032f66..36970813d8 100644
657--- a/src/udev/udev-rules.c 670--- a/src/udev/udev-rules.c
658+++ b/src/udev/udev-rules.c 671+++ b/src/udev/udev-rules.c
659@@ -30,6 +30,7 @@ 672@@ -30,6 +30,7 @@
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 9142d7b45c..abc438e4ba 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
@@ -52,10 +52,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
52 src/udev/udev-builtin-net_setup_link.c | 1 + 52 src/udev/udev-builtin-net_setup_link.c | 1 +
53 19 files changed, 18 insertions(+), 4 deletions(-) 53 19 files changed, 18 insertions(+), 4 deletions(-)
54 54
55diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c 55Index: systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
56index eac2e725cce7..1beae7ba91cc 100644 56===================================================================
57--- a/src/libsystemd-network/sd-dhcp6-client.c 57--- systemd-stable.orig/src/libsystemd-network/sd-dhcp6-client.c
58+++ b/src/libsystemd-network/sd-dhcp6-client.c 58+++ systemd-stable/src/libsystemd-network/sd-dhcp6-client.c
59@@ -5,7 +5,6 @@ 59@@ -5,7 +5,6 @@
60 60
61 #include <errno.h> 61 #include <errno.h>
@@ -64,10 +64,10 @@ index eac2e725cce7..1beae7ba91cc 100644
64 #include <linux/if_infiniband.h> 64 #include <linux/if_infiniband.h>
65 65
66 #include "sd-dhcp6-client.h" 66 #include "sd-dhcp6-client.h"
67diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c 67Index: systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
68index e35127a4cd2e..4f6ad9ef5886 100644 68===================================================================
69--- a/src/libsystemd/sd-netlink/netlink-types.c 69--- systemd-stable.orig/src/libsystemd/sd-netlink/netlink-types.c
70+++ b/src/libsystemd/sd-netlink/netlink-types.c 70+++ systemd-stable/src/libsystemd/sd-netlink/netlink-types.c
71@@ -3,6 +3,7 @@ 71@@ -3,6 +3,7 @@
72 #include <netinet/in.h> 72 #include <netinet/in.h>
73 #include <stdint.h> 73 #include <stdint.h>
@@ -76,10 +76,10 @@ index e35127a4cd2e..4f6ad9ef5886 100644
76 #include <linux/can/vxcan.h> 76 #include <linux/can/vxcan.h>
77 #include <linux/netlink.h> 77 #include <linux/netlink.h>
78 #include <linux/rtnetlink.h> 78 #include <linux/rtnetlink.h>
79diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c 79Index: systemd-stable/src/machine/machine-dbus.c
80index a2990452af17..5af350883c28 100644 80===================================================================
81--- a/src/machine/machine-dbus.c 81--- systemd-stable.orig/src/machine/machine-dbus.c
82+++ b/src/machine/machine-dbus.c 82+++ systemd-stable/src/machine/machine-dbus.c
83@@ -3,6 +3,7 @@ 83@@ -3,6 +3,7 @@
84 #include <errno.h> 84 #include <errno.h>
85 #include <sys/mount.h> 85 #include <sys/mount.h>
@@ -88,21 +88,21 @@ index a2990452af17..5af350883c28 100644
88 88
89 /* When we include libgen.h because we need dirname() we immediately 89 /* When we include libgen.h because we need dirname() we immediately
90 * undefine basename() since libgen.h defines it as a macro to the POSIX 90 * undefine basename() since libgen.h defines it as a macro to the POSIX
91diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c 91Index: systemd-stable/src/network/netdev/bond.c
92index 8df39e35843f..8d697894f970 100644 92===================================================================
93--- a/src/network/netdev/bond.c 93--- systemd-stable.orig/src/network/netdev/bond.c
94+++ b/src/network/netdev/bond.c 94+++ systemd-stable/src/network/netdev/bond.c
95@@ -1,5 +1,6 @@ 95@@ -1,5 +1,6 @@
96 /* SPDX-License-Identifier: LGPL-2.1+ */ 96 /* SPDX-License-Identifier: LGPL-2.1+ */
97 97
98+#include <netinet/if_ether.h> 98+#include <netinet/if_ether.h>
99 #include "alloc-util.h" 99 #include "alloc-util.h"
100 #include "bond.h" 100 #include "bond.h"
101 #include "conf-parser.h" 101 #include "bond-util.h"
102diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c 102Index: systemd-stable/src/network/netdev/bridge.c
103index 6b8f9944612e..7f81ec25c407 100644 103===================================================================
104--- a/src/network/netdev/bridge.c 104--- systemd-stable.orig/src/network/netdev/bridge.c
105+++ b/src/network/netdev/bridge.c 105+++ systemd-stable/src/network/netdev/bridge.c
106@@ -1,5 +1,6 @@ 106@@ -1,5 +1,6 @@
107 /* SPDX-License-Identifier: LGPL-2.1+ */ 107 /* SPDX-License-Identifier: LGPL-2.1+ */
108 108
@@ -110,10 +110,10 @@ index 6b8f9944612e..7f81ec25c407 100644
110 #include <net/if.h> 110 #include <net/if.h>
111 111
112 #include "bridge.h" 112 #include "bridge.h"
113diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c 113Index: systemd-stable/src/network/netdev/macsec.c
114index 7d1fec3afe6d..e948a335336d 100644 114===================================================================
115--- a/src/network/netdev/macsec.c 115--- systemd-stable.orig/src/network/netdev/macsec.c
116+++ b/src/network/netdev/macsec.c 116+++ systemd-stable/src/network/netdev/macsec.c
117@@ -1,5 +1,6 @@ 117@@ -1,5 +1,6 @@
118 /* SPDX-License-Identifier: LGPL-2.1+ */ 118 /* SPDX-License-Identifier: LGPL-2.1+ */
119 119
@@ -121,10 +121,10 @@ index 7d1fec3afe6d..e948a335336d 100644
121 #include <netinet/in.h> 121 #include <netinet/in.h>
122 #include <linux/if_ether.h> 122 #include <linux/if_ether.h>
123 #include <linux/if_macsec.h> 123 #include <linux/if_macsec.h>
124diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf 124Index: systemd-stable/src/network/netdev/netdev-gperf.gperf
125index 09a5f4822e03..873299b1f98a 100644 125===================================================================
126--- a/src/network/netdev/netdev-gperf.gperf 126--- systemd-stable.orig/src/network/netdev/netdev-gperf.gperf
127+++ b/src/network/netdev/netdev-gperf.gperf 127+++ systemd-stable/src/network/netdev/netdev-gperf.gperf
128@@ -2,6 +2,7 @@ 128@@ -2,6 +2,7 @@
129 #if __GNUC__ >= 7 129 #if __GNUC__ >= 7
130 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") 130 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
@@ -133,21 +133,21 @@ index 09a5f4822e03..873299b1f98a 100644
133 #include <stddef.h> 133 #include <stddef.h>
134 #include "bond.h" 134 #include "bond.h"
135 #include "bridge.h" 135 #include "bridge.h"
136diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c 136Index: systemd-stable/src/network/netdev/netdev.c
137index f8121a48ed92..437f411c61e8 100644 137===================================================================
138--- a/src/network/netdev/netdev.c 138--- systemd-stable.orig/src/network/netdev/netdev.c
139+++ b/src/network/netdev/netdev.c 139+++ systemd-stable/src/network/netdev/netdev.c
140@@ -1,5 +1,6 @@ 140@@ -1,5 +1,6 @@
141 /* SPDX-License-Identifier: LGPL-2.1+ */ 141 /* SPDX-License-Identifier: LGPL-2.1+ */
142 142
143+#include <netinet/if_ether.h> 143+#include <netinet/if_ether.h>
144 #include <net/if.h> 144 #include <net/if.h>
145 #include <netinet/in.h> 145 #include <netinet/in.h>
146 146 #include <unistd.h>
147diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c 147Index: systemd-stable/src/network/networkd-brvlan.c
148index 41f09287f2b7..b67ce4fc8844 100644 148===================================================================
149--- a/src/network/networkd-brvlan.c 149--- systemd-stable.orig/src/network/networkd-brvlan.c
150+++ b/src/network/networkd-brvlan.c 150+++ systemd-stable/src/network/networkd-brvlan.c
151@@ -4,6 +4,7 @@ 151@@ -4,6 +4,7 @@
152 ***/ 152 ***/
153 153
@@ -156,11 +156,11 @@ index 41f09287f2b7..b67ce4fc8844 100644
156 #include <linux/if_bridge.h> 156 #include <linux/if_bridge.h>
157 #include <stdbool.h> 157 #include <stdbool.h>
158 158
159diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c 159Index: systemd-stable/src/network/networkd-dhcp-common.c
160index 8664d8cdc0d4..e9f91f74c1a1 100644 160===================================================================
161--- a/src/network/networkd-dhcp-common.c 161--- systemd-stable.orig/src/network/networkd-dhcp-common.c
162+++ b/src/network/networkd-dhcp-common.c 162+++ systemd-stable/src/network/networkd-dhcp-common.c
163@@ -4,6 +4,7 @@ 163@@ -5,6 +5,7 @@
164 #include "escape.h" 164 #include "escape.h"
165 #include "in-addr-util.h" 165 #include "in-addr-util.h"
166 #include "networkd-dhcp-common.h" 166 #include "networkd-dhcp-common.h"
@@ -168,10 +168,10 @@ index 8664d8cdc0d4..e9f91f74c1a1 100644
168 #include "networkd-network.h" 168 #include "networkd-network.h"
169 #include "parse-util.h" 169 #include "parse-util.h"
170 #include "string-table.h" 170 #include "string-table.h"
171diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c 171Index: systemd-stable/src/network/networkd-dhcp4.c
172index 13e3e32f40e8..5394399c9150 100644 172===================================================================
173--- a/src/network/networkd-dhcp4.c 173--- systemd-stable.orig/src/network/networkd-dhcp4.c
174+++ b/src/network/networkd-dhcp4.c 174+++ systemd-stable/src/network/networkd-dhcp4.c
175@@ -1,9 +1,9 @@ 175@@ -1,9 +1,9 @@
176 /* SPDX-License-Identifier: LGPL-2.1+ */ 176 /* SPDX-License-Identifier: LGPL-2.1+ */
177 177
@@ -181,12 +181,12 @@ index 13e3e32f40e8..5394399c9150 100644
181 #include <linux/if.h> 181 #include <linux/if.h>
182-#include <linux/if_arp.h> 182-#include <linux/if_arp.h>
183 183
184 #include "escape.h"
184 #include "alloc-util.h" 185 #include "alloc-util.h"
185 #include "dhcp-client-internal.h" 186Index: systemd-stable/src/network/networkd-dhcp6.c
186diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c 187===================================================================
187index 7304270c60b1..099064f64715 100644 188--- systemd-stable.orig/src/network/networkd-dhcp6.c
188--- a/src/network/networkd-dhcp6.c 189+++ systemd-stable/src/network/networkd-dhcp6.c
189+++ b/src/network/networkd-dhcp6.c
190@@ -3,9 +3,9 @@ 190@@ -3,9 +3,9 @@
191 Copyright © 2014 Intel Corporation. All rights reserved. 191 Copyright © 2014 Intel Corporation. All rights reserved.
192 ***/ 192 ***/
@@ -195,13 +195,13 @@ index 7304270c60b1..099064f64715 100644
195 #include <netinet/in.h> 195 #include <netinet/in.h>
196 #include <linux/if.h> 196 #include <linux/if.h>
197-#include <linux/if_arp.h> 197-#include <linux/if_arp.h>
198 #include "sd-radv.h"
199 198
200 #include "sd-dhcp6-client.h" 199 #include "sd-dhcp6-client.h"
201diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c 200
202index 99d4b29c31ec..e8b467d6ac09 100644 201Index: systemd-stable/src/network/networkd-link.c
203--- a/src/network/networkd-link.c 202===================================================================
204+++ b/src/network/networkd-link.c 203--- systemd-stable.orig/src/network/networkd-link.c
204+++ systemd-stable/src/network/networkd-link.c
205@@ -1,8 +1,8 @@ 205@@ -1,8 +1,8 @@
206 /* SPDX-License-Identifier: LGPL-2.1+ */ 206 /* SPDX-License-Identifier: LGPL-2.1+ */
207 207
@@ -209,13 +209,13 @@ index 99d4b29c31ec..e8b467d6ac09 100644
209 #include <netinet/in.h> 209 #include <netinet/in.h>
210 #include <linux/if.h> 210 #include <linux/if.h>
211-#include <linux/if_arp.h> 211-#include <linux/if_arp.h>
212 #include <linux/if_link.h>
212 #include <unistd.h> 213 #include <unistd.h>
213 214
214 #include "alloc-util.h" 215Index: systemd-stable/src/network/networkd-network.c
215diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c 216===================================================================
216index 2e716b291e97..56f18cea57fe 100644 217--- systemd-stable.orig/src/network/networkd-network.c
217--- a/src/network/networkd-network.c 218+++ systemd-stable/src/network/networkd-network.c
218+++ b/src/network/networkd-network.c
219@@ -1,5 +1,6 @@ 219@@ -1,5 +1,6 @@
220 /* SPDX-License-Identifier: LGPL-2.1+ */ 220 /* SPDX-License-Identifier: LGPL-2.1+ */
221 221
@@ -223,19 +223,19 @@ index 2e716b291e97..56f18cea57fe 100644
223 #include <net/if.h> 223 #include <net/if.h>
224 #include <netinet/in.h> 224 #include <netinet/in.h>
225 #include <linux/netdevice.h> 225 #include <linux/netdevice.h>
226diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c 226Index: systemd-stable/src/network/test-network-tables.c
227index 25b939639775..530e4928835c 100644 227===================================================================
228--- a/src/network/test-network-tables.c 228--- systemd-stable.orig/src/network/test-network-tables.c
229+++ b/src/network/test-network-tables.c 229+++ systemd-stable/src/network/test-network-tables.c
230@@ -1,3 +1,4 @@ 230@@ -1,3 +1,4 @@
231+#include <netinet/if_ether.h> 231+#include <netinet/if_ether.h>
232 #include "bond.h" 232 #include "bond.h"
233 #include "dhcp6-internal.h" 233 #include "dhcp6-internal.h"
234 #include "dhcp6-protocol.h" 234 #include "dhcp6-protocol.h"
235diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c 235Index: systemd-stable/src/shared/ethtool-util.c
236index 00a71d64a638..4593e89120b8 100644 236===================================================================
237--- a/src/shared/ethtool-util.c 237--- systemd-stable.orig/src/shared/ethtool-util.c
238+++ b/src/shared/ethtool-util.c 238+++ systemd-stable/src/shared/ethtool-util.c
239@@ -1,5 +1,6 @@ 239@@ -1,5 +1,6 @@
240 /* SPDX-License-Identifier: LGPL-2.1+ */ 240 /* SPDX-License-Identifier: LGPL-2.1+ */
241 241
@@ -243,10 +243,10 @@ index 00a71d64a638..4593e89120b8 100644
243 #include <net/if.h> 243 #include <net/if.h>
244 #include <sys/ioctl.h> 244 #include <sys/ioctl.h>
245 #include <linux/ethtool.h> 245 #include <linux/ethtool.h>
246diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h 246Index: systemd-stable/src/shared/ethtool-util.h
247index c1d5d7590ef9..b3e018bf76e9 100644 247===================================================================
248--- a/src/shared/ethtool-util.h 248--- systemd-stable.orig/src/shared/ethtool-util.h
249+++ b/src/shared/ethtool-util.h 249+++ systemd-stable/src/shared/ethtool-util.h
250@@ -3,6 +3,7 @@ 250@@ -3,6 +3,7 @@
251 251
252 #include <macro.h> 252 #include <macro.h>
@@ -255,21 +255,21 @@ index c1d5d7590ef9..b3e018bf76e9 100644
255 #include <linux/ethtool.h> 255 #include <linux/ethtool.h>
256 256
257 #include "conf-parser.h" 257 #include "conf-parser.h"
258diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c 258Index: systemd-stable/src/udev/net/link-config.c
259index 0332e99269c9..ff3aead4a779 100644 259===================================================================
260--- a/src/udev/net/link-config.c 260--- systemd-stable.orig/src/udev/net/link-config.c
261+++ b/src/udev/net/link-config.c 261+++ systemd-stable/src/udev/net/link-config.c
262@@ -1,5 +1,6 @@ 262@@ -1,5 +1,6 @@
263 /* SPDX-License-Identifier: LGPL-2.1+ */ 263 /* SPDX-License-Identifier: LGPL-2.1+ */
264 264
265+#include <netinet/if_ether.h> 265+#include <netinet/if_ether.h>
266 #include <linux/netdevice.h> 266 #include <linux/netdevice.h>
267 #include <netinet/ether.h> 267 #include <netinet/ether.h>
268 268 #include <unistd.h>
269diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c 269Index: systemd-stable/src/udev/udev-builtin-net_setup_link.c
270index ee3ca9fa3846..9aa4e828741f 100644 270===================================================================
271--- a/src/udev/udev-builtin-net_setup_link.c 271--- systemd-stable.orig/src/udev/udev-builtin-net_setup_link.c
272+++ b/src/udev/udev-builtin-net_setup_link.c 272+++ systemd-stable/src/udev/udev-builtin-net_setup_link.c
273@@ -1,5 +1,6 @@ 273@@ -1,5 +1,6 @@
274 /* SPDX-License-Identifier: LGPL-2.1+ */ 274 /* SPDX-License-Identifier: LGPL-2.1+ */
275 275
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 580c49fecf..dd6ecebeb4 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,10 +23,10 @@ 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 26Index: systemd-stable/src/basic/glob-util.c
27index e3aa6c2e152b..38070b79c83a 100644 27===================================================================
28--- a/src/basic/glob-util.c 28--- systemd-stable.orig/src/basic/glob-util.c
29+++ b/src/basic/glob-util.c 29+++ systemd-stable/src/basic/glob-util.c
30@@ -12,6 +12,12 @@ 30@@ -12,6 +12,12 @@
31 #include "path-util.h" 31 #include "path-util.h"
32 #include "strv.h" 32 #include "strv.h"
@@ -48,7 +48,7 @@ index e3aa6c2e152b..38070b79c83a 100644
48 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ 48 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
49 assert(!(flags & GLOB_ALTDIRFUNC)); 49 assert(!(flags & GLOB_ALTDIRFUNC));
50 50
51@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { 51@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag
52 pglob->gl_lstat = lstat; 52 pglob->gl_lstat = lstat;
53 if (!pglob->gl_stat) 53 if (!pglob->gl_stat)
54 pglob->gl_stat = stat; 54 pglob->gl_stat = stat;
@@ -63,10 +63,10 @@ index e3aa6c2e152b..38070b79c83a 100644
63 if (k == GLOB_NOMATCH) 63 if (k == GLOB_NOMATCH)
64 return -ENOENT; 64 return -ENOENT;
65 if (k == GLOB_NOSPACE) 65 if (k == GLOB_NOSPACE)
66diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c 66Index: systemd-stable/src/test/test-glob-util.c
67index 667d15335fbf..76a84443aacf 100644 67===================================================================
68--- a/src/test/test-glob-util.c 68--- systemd-stable.orig/src/test/test-glob-util.c
69+++ b/src/test/test-glob-util.c 69+++ systemd-stable/src/test/test-glob-util.c
70@@ -12,6 +12,12 @@ 70@@ -12,6 +12,12 @@
71 #include "rm-rf.h" 71 #include "rm-rf.h"
72 #include "tmpfile-util.h" 72 #include "tmpfile-util.h"
@@ -114,11 +114,11 @@ index 667d15335fbf..76a84443aacf 100644
114 assert_se(r == GLOB_NOMATCH); 114 assert_se(r == GLOB_NOMATCH);
115 115
116 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); 116 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
117diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c 117Index: systemd-stable/src/tmpfiles/tmpfiles.c
118index 193ed0bc781b..2f94fd2efd8f 100644 118===================================================================
119--- a/src/tmpfiles/tmpfiles.c 119--- systemd-stable.orig/src/tmpfiles/tmpfiles.c
120+++ b/src/tmpfiles/tmpfiles.c 120+++ systemd-stable/src/tmpfiles/tmpfiles.c
121@@ -58,6 +58,12 @@ 121@@ -59,6 +59,12 @@
122 #include "umask-util.h" 122 #include "umask-util.h"
123 #include "user-util.h" 123 #include "user-util.h"
124 124
@@ -131,7 +131,7 @@ index 193ed0bc781b..2f94fd2efd8f 100644
131 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates 131 /* 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 132 * them in the file system. This is intended to be used to create
133 * properly owned directories beneath /tmp, /var/tmp, /run, which are 133 * properly owned directories beneath /tmp, /var/tmp, /run, which are
134@@ -1850,7 +1856,9 @@ finish: 134@@ -1867,7 +1873,9 @@ finish:
135 135
136 static int glob_item(Item *i, action_t action) { 136 static int glob_item(Item *i, action_t action) {
137 _cleanup_globfree_ glob_t g = { 137 _cleanup_globfree_ glob_t g = {
@@ -141,7 +141,7 @@ index 193ed0bc781b..2f94fd2efd8f 100644
141 }; 141 };
142 int r = 0, k; 142 int r = 0, k;
143 char **fn; 143 char **fn;
144@@ -1870,7 +1878,9 @@ static int glob_item(Item *i, action_t action) { 144@@ -1887,7 +1895,9 @@ static int glob_item(Item *i, action_t a
145 145
146 static int glob_item_recursively(Item *i, fdaction_t action) { 146 static int glob_item_recursively(Item *i, fdaction_t action) {
147 _cleanup_globfree_ glob_t g = { 147 _cleanup_globfree_ glob_t g = {
diff --git a/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
index 5ee501f235..15055161fc 100644
--- a/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ b/meta/recipes-core/systemd/systemd/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -11,10 +11,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11 src/basic/process-util.c | 7 +++++++ 11 src/basic/process-util.c | 7 +++++++
12 1 file changed, 7 insertions(+) 12 1 file changed, 7 insertions(+)
13 13
14diff --git a/src/basic/process-util.c b/src/basic/process-util.c 14Index: systemd-stable/src/basic/process-util.c
15index 5de366f830e8..644f53aee005 100644 15===================================================================
16--- a/src/basic/process-util.c 16--- systemd-stable.orig/src/basic/process-util.c
17+++ b/src/basic/process-util.c 17+++ systemd-stable/src/basic/process-util.c
18@@ -18,6 +18,9 @@ 18@@ -18,6 +18,9 @@
19 #if HAVE_VALGRIND_VALGRIND_H 19 #if HAVE_VALGRIND_VALGRIND_H
20 #include <valgrind/valgrind.h> 20 #include <valgrind/valgrind.h>
@@ -25,7 +25,7 @@ index 5de366f830e8..644f53aee005 100644
25 25
26 #include "alloc-util.h" 26 #include "alloc-util.h"
27 #include "architecture.h" 27 #include "architecture.h"
28@@ -1116,11 +1119,15 @@ void reset_cached_pid(void) { 28@@ -1143,11 +1146,15 @@ void reset_cached_pid(void) {
29 cached_pid = CACHED_PID_UNSET; 29 cached_pid = CACHED_PID_UNSET;
30 } 30 }
31 31
diff --git a/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
index e5d9515e86..a6fcd2f5da 100644
--- a/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta/recipes-core/systemd/systemd/0011-Use-uintmax_t-for-handling-rlim_t.patch
@@ -27,11 +27,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
27 src/core/execute.c | 4 ++-- 27 src/core/execute.c | 4 ++--
28 3 files changed, 8 insertions(+), 14 deletions(-) 28 3 files changed, 8 insertions(+), 14 deletions(-)
29 29
30diff --git a/src/basic/format-util.h b/src/basic/format-util.h 30Index: systemd-stable/src/basic/format-util.h
31index c47fa76ea8ff..14a78d9f5fd0 100644 31===================================================================
32--- a/src/basic/format-util.h 32--- systemd-stable.orig/src/basic/format-util.h
33+++ b/src/basic/format-util.h 33+++ systemd-stable/src/basic/format-util.h
34@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); 34@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32
35 # define PRI_TIMEX "li" 35 # define PRI_TIMEX "li"
36 #endif 36 #endif
37 37
@@ -46,11 +46,11 @@ index c47fa76ea8ff..14a78d9f5fd0 100644
46 46
47 #if SIZEOF_DEV_T == 8 47 #if SIZEOF_DEV_T == 8
48 # define DEV_FMT "%" PRIu64 48 # define DEV_FMT "%" PRIu64
49diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c 49Index: systemd-stable/src/basic/rlimit-util.c
50index 2dc13eabc30d..0633cc67f417 100644 50===================================================================
51--- a/src/basic/rlimit-util.c 51--- systemd-stable.orig/src/basic/rlimit-util.c
52+++ b/src/basic/rlimit-util.c 52+++ systemd-stable/src/basic/rlimit-util.c
53@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { 53@@ -306,13 +306,13 @@ int rlimit_format(const struct rlimit *r
54 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) 54 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
55 s = strdup("infinity"); 55 s = strdup("infinity");
56 else if (rl->rlim_cur >= RLIM_INFINITY) 56 else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -77,11 +77,11 @@ index 2dc13eabc30d..0633cc67f417 100644
77 77
78 return 1; 78 return 1;
79 } 79 }
80diff --git a/src/core/execute.c b/src/core/execute.c 80Index: systemd-stable/src/core/execute.c
81index 9762dc57443c..4a3421bb3ee6 100644 81===================================================================
82--- a/src/core/execute.c 82--- systemd-stable.orig/src/core/execute.c
83+++ b/src/core/execute.c 83+++ systemd-stable/src/core/execute.c
84@@ -4567,9 +4567,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { 84@@ -4686,9 +4686,9 @@ void exec_context_dump(const ExecContext
85 for (i = 0; i < RLIM_NLIMITS; i++) 85 for (i = 0; i < RLIM_NLIMITS; i++)
86 if (c->rlimit[i]) { 86 if (c->rlimit[i]) {
87 fprintf(f, "%sLimit%s: " RLIM_FMT "\n", 87 fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
diff --git a/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index efeef07295..0a7594c068 100644
--- a/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta/recipes-core/systemd/systemd/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -31,13 +31,13 @@ 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(+), 4 deletions(-) 32 2 files changed, 24 insertions(+), 4 deletions(-)
33 33
34diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h 34Index: systemd-stable/src/basic/fs-util.h
35index 78d68be9fd85..c5dc84d41868 100644 35===================================================================
36--- a/src/basic/fs-util.h 36--- systemd-stable.orig/src/basic/fs-util.h
37+++ b/src/basic/fs-util.h 37+++ systemd-stable/src/basic/fs-util.h
38@@ -40,7 +40,27 @@ int fchmod_opath(int fd, mode_t m); 38@@ -42,7 +42,27 @@ int fchmod_opath(int fd, mode_t m);
39
40 int fd_warn_permissions(const char *path, int fd); 39 int fd_warn_permissions(const char *path, int fd);
40 int stat_warn_permissions(const char *path, const struct stat *st);
41 41
42-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) 42-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
43+/* 43+/*
@@ -64,11 +64,11 @@ index 78d68be9fd85..c5dc84d41868 100644
64 64
65 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); 65 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
66 int touch(const char *path); 66 int touch(const char *path);
67diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c 67Index: systemd-stable/src/shared/base-filesystem.c
68index 657407da2d37..fbd5782d84fc 100644 68===================================================================
69--- a/src/shared/base-filesystem.c 69--- systemd-stable.orig/src/shared/base-filesystem.c
70+++ b/src/shared/base-filesystem.c 70+++ systemd-stable/src/shared/base-filesystem.c
71@@ -54,7 +54,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 71@@ -54,7 +54,7 @@ int base_filesystem_create(const char *r
72 return log_error_errno(errno, "Failed to open root file system: %m"); 72 return log_error_errno(errno, "Failed to open root file system: %m");
73 73
74 for (i = 0; i < ELEMENTSOF(table); i ++) { 74 for (i = 0; i < ELEMENTSOF(table); i ++) {
@@ -77,7 +77,7 @@ index 657407da2d37..fbd5782d84fc 100644
77 continue; 77 continue;
78 78
79 if (table[i].target) { 79 if (table[i].target) {
80@@ -62,7 +62,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 80@@ -62,7 +62,7 @@ int base_filesystem_create(const char *r
81 81
82 /* check if one of the targets exists */ 82 /* check if one of the targets exists */
83 NULSTR_FOREACH(s, table[i].target) { 83 NULSTR_FOREACH(s, table[i].target) {
@@ -86,7 +86,7 @@ index 657407da2d37..fbd5782d84fc 100644
86 continue; 86 continue;
87 87
88 /* check if a specific file exists at the target path */ 88 /* check if a specific file exists at the target path */
89@@ -73,7 +73,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 89@@ -73,7 +73,7 @@ int base_filesystem_create(const char *r
90 if (!p) 90 if (!p)
91 return log_oom(); 91 return log_oom();
92 92
diff --git a/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index 19a3eef847..67d5041917 100644
--- a/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/meta/recipes-core/systemd/systemd/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 src/machine/machine-dbus.c | 5 +++++ 14 src/machine/machine-dbus.c | 5 +++++
15 1 file changed, 5 insertions(+) 15 1 file changed, 5 insertions(+)
16 16
17diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c 17Index: systemd-stable/src/machine/machine-dbus.c
18index 760ccb445cd0..0df20f3864b3 100644 18===================================================================
19--- a/src/machine/machine-dbus.c 19--- systemd-stable.orig/src/machine/machine-dbus.c
20+++ b/src/machine/machine-dbus.c 20+++ systemd-stable/src/machine/machine-dbus.c
21@@ -11,6 +11,11 @@ 21@@ -11,6 +11,11 @@
22 #include <libgen.h> 22 #include <libgen.h>
23 #undef basename 23 #undef basename
@@ -29,4 +29,4 @@ index 760ccb445cd0..0df20f3864b3 100644
29+ 29+
30 #include "alloc-util.h" 30 #include "alloc-util.h"
31 #include "bus-common-errors.h" 31 #include "bus-common-errors.h"
32 #include "bus-internal.h" 32 #include "bus-get-properties.h"
diff --git a/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index 1934b783dc..3d456ec83a 100644
--- a/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -24,11 +24,11 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
24 src/basic/process-util.c | 2 +- 24 src/basic/process-util.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-) 25 1 file changed, 1 insertion(+), 1 deletion(-)
26 26
27diff --git a/src/basic/process-util.c b/src/basic/process-util.c 27Index: systemd-stable/src/basic/process-util.c
28index 644f53aee005..acaf13591396 100644 28===================================================================
29--- a/src/basic/process-util.c 29--- systemd-stable.orig/src/basic/process-util.c
30+++ b/src/basic/process-util.c 30+++ systemd-stable/src/basic/process-util.c
31@@ -1500,7 +1500,7 @@ int set_oom_score_adjust(int value) { 31@@ -1536,7 +1536,7 @@ int set_oom_score_adjust(int value) {
32 sprintf(t, "%i", value); 32 sprintf(t, "%i", value);
33 33
34 return write_string_file("/proc/self/oom_score_adj", t, 34 return write_string_file("/proc/self/oom_score_adj", t,
diff --git a/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index 84a492f290..48fd007e11 100644
--- a/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/meta/recipes-core/systemd/systemd/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -24,11 +24,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
24 src/libsystemd/sd-bus/bus-error.c | 5 +++++ 24 src/libsystemd/sd-bus/bus-error.c | 5 +++++
25 2 files changed, 10 insertions(+) 25 2 files changed, 10 insertions(+)
26 26
27diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c 27Index: systemd-stable/src/journal/journal-send.c
28index 43ed756bda53..227ea64dbb48 100644 28===================================================================
29--- a/src/journal/journal-send.c 29--- systemd-stable.orig/src/journal/journal-send.c
30+++ b/src/journal/journal-send.c 30+++ systemd-stable/src/journal/journal-send.c
31@@ -336,7 +336,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove 31@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co
32 char* j; 32 char* j;
33 33
34 errno = 0; 34 errno = 0;
@@ -41,11 +41,11 @@ index 43ed756bda53..227ea64dbb48 100644
41 if (errno == 0) { 41 if (errno == 0) {
42 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; 42 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
43 43
44diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c 44Index: systemd-stable/src/libsystemd/sd-bus/bus-error.c
45index f760f0fdd21c..28a5159c4480 100644 45===================================================================
46--- a/src/libsystemd/sd-bus/bus-error.c 46--- systemd-stable.orig/src/libsystemd/sd-bus/bus-error.c
47+++ b/src/libsystemd/sd-bus/bus-error.c 47+++ systemd-stable/src/libsystemd/sd-bus/bus-error.c
48@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { 48@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_er
49 return; 49 return;
50 50
51 errno = 0; 51 errno = 0;
diff --git a/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch b/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch
new file mode 100644
index 0000000000..67d9162c08
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0021-Handle-missing-LOCK_EX.patch
@@ -0,0 +1,23 @@
1From 190854c2114dc6e74c8859dc251e3737e3c0f353 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Fri, 7 Aug 2020 15:19:27 +0000
4Subject: [PATCH] Handle missing LOCK_EX
5
6Upstream-Status: Inappropriate [musl specific]
7Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
8---
9 src/partition/makefs.c | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/src/partition/makefs.c b/src/partition/makefs.c
13index 97f50c9033..7f55acd229 100644
14--- a/src/partition/makefs.c
15+++ b/src/partition/makefs.c
16@@ -5,6 +5,7 @@
17 #include <sys/stat.h>
18 #include <sys/types.h>
19 #include <unistd.h>
20+#include <sys/file.h>
21
22 #include "alloc-util.h"
23 #include "blockdev-util.h"
diff --git a/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
new file mode 100644
index 0000000000..d57ca1fd39
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
@@ -0,0 +1,37 @@
1From 328c39fae2631deb5737dd56f46159dd6b4cdbed Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Fri, 7 Aug 2020 15:20:17 +0000
4Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un *
5
6| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns':
7| ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types]
8| 4893 | if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
9| | ^~~~~~
10| | |
11| | struct sockaddr_un *
12| In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22,
13| from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21:
14| /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *'
15| 384 | int connect (int, const struct sockaddr *, socklen_t);
16| | ^~~~~~~~~~~~~~~~~~~~~~~
17| cc1: some warnings being treated as errors
18
19Upstream-Status: Inappropriate [musl specific]
20Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
21---
22 src/nspawn/nspawn.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
26index 0450c9f795..7305db04ef 100644
27--- a/src/nspawn/nspawn.c
28+++ b/src/nspawn/nspawn.c
29@@ -4890,7 +4890,7 @@ static int cant_be_in_netns(void) {
30 if (fd < 0)
31 return log_error_errno(errno, "Failed to allocate udev control socket: %m");
32
33- if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
34+ if (connect(fd, (struct sockaddr *)&sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) {
35
36 if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno))
37 return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
diff --git a/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch b/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch
new file mode 100644
index 0000000000..78660691d3
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch
@@ -0,0 +1,31 @@
1From f939d3e07e1175caac5cf4cbf54bd8a58c2f198a Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Fri, 7 Aug 2020 15:30:52 +0000
4Subject: [PATCH] Fix field 'efi_loader_entry_one_shot_stat' has incomplete
5 type
6
7| In file included from ../../../../../../workspace/sources/systemd/src/login/logind-gperf.gperf:7:
8| ../../../../../../workspace/sources/systemd/src/login/logind.h:131:21: error: field 'efi_loader_entry_one_shot_stat' has incomplete type
9| 131 | struct stat efi_loader_entry_one_shot_stat;
10| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12Upstream-Status: Inappropriate [musl specific]
13Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
14---
15 src/login/logind.h | 3 +++
16 1 file changed, 3 insertions(+)
17
18diff --git a/src/login/logind.h b/src/login/logind.h
19index e64ecce8e2..2d4007d84b 100644
20--- a/src/login/logind.h
21+++ b/src/login/logind.h
22@@ -2,6 +2,9 @@
23 #pragma once
24
25 #include <stdbool.h>
26+#include <sys/types.h>
27+#include <sys/stat.h>
28+#include <unistd.h>
29
30 #include "sd-bus.h"
31 #include "sd-device.h"
diff --git a/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch b/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch
deleted file mode 100644
index 7b5e3e7f7a..0000000000
--- a/meta/recipes-core/systemd/systemd/CVE-2020-13776.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From 156a5fd297b61bce31630d7a52c15614bf784843 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
3Date: Sun, 31 May 2020 18:21:09 +0200
4Subject: [PATCH 1/1] basic/user-util: always use base 10 for user/group
5 numbers
6
7We would parse numbers with base prefixes as user identifiers. For example,
8"0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be
9interpreted as UID==1000. This parsing was used also in cases where either a
10user/group name or number may be specified. This means that names like
110x2b3bfa0 would be ambiguous: they are a valid user name according to our
12documented relaxed rules, but they would also be parsed as numeric uids.
13
14This behaviour is definitely not expected by users, since tools generally only
15accept decimal numbers (e.g. id, getent passwd), while other tools only accept
16user names and thus will interpret such strings as user names without even
17attempting to convert them to numbers (su, ssh). So let's follow suit and only
18accept numbers in decimal notation. Effectively this means that we will reject
19such strings as a username/uid/groupname/gid where strict mode is used, and try
20to look up a user/group with such a name in relaxed mode.
21
22Since the function changed is fairly low-level and fairly widely used, this
23affects multiple tools: loginctl show-user/enable-linger/disable-linger foo',
24the third argument in sysusers.d, fourth and fifth arguments in tmpfiles.d,
25etc.
26
27Fixes #15985.
28---
29 src/basic/user-util.c | 2 +-
30 src/test/test-user-util.c | 10 ++++++++++
31 2 files changed, 11 insertions(+), 1 deletion(-)
32
33--- end of commit 156a5fd297b61bce31630d7a52c15614bf784843 ---
34
35
36Add definition of safe_atou32_full() from commit b934ac3d6e7dcad114776ef30ee9098693e7ab7e
37
38CVE: CVE-2020-13776
39
40Upstream-Status: Backport [https://github.com/systemd/systemd.git]
41
42Signed-off-by: Joe Slater <joe.slater@windriver.com>
43
44
45
46--- git.orig/src/basic/user-util.c
47+++ git/src/basic/user-util.c
48@@ -49,7 +49,7 @@ int parse_uid(const char *s, uid_t *ret)
49 assert(s);
50
51 assert_cc(sizeof(uid_t) == sizeof(uint32_t));
52- r = safe_atou32(s, &uid);
53+ r = safe_atou32_full(s, 10, &uid);
54 if (r < 0)
55 return r;
56
57--- git.orig/src/test/test-user-util.c
58+++ git/src/test/test-user-util.c
59@@ -48,9 +48,19 @@ static void test_parse_uid(void) {
60
61 r = parse_uid("65535", &uid);
62 assert_se(r == -ENXIO);
63+ assert_se(uid == 100);
64+
65+ r = parse_uid("0x1234", &uid);
66+ assert_se(r == -EINVAL);
67+ assert_se(uid == 100);
68+
69+ r = parse_uid("01234", &uid);
70+ assert_se(r == 0);
71+ assert_se(uid == 1234);
72
73 r = parse_uid("asdsdas", &uid);
74 assert_se(r == -EINVAL);
75+ assert_se(uid == 1234);
76 }
77
78 static void test_uid_ptr(void) {
79--- git.orig/src/basic/parse-util.h
80+++ git/src/basic/parse-util.h
81@@ -45,9 +45,13 @@ static inline int safe_atoux16(const cha
82
83 int safe_atoi16(const char *s, int16_t *ret);
84
85-static inline int safe_atou32(const char *s, uint32_t *ret_u) {
86+static inline int safe_atou32_full(const char *s, unsigned base, uint32_t *ret_u) {
87 assert_cc(sizeof(uint32_t) == sizeof(unsigned));
88- return safe_atou(s, (unsigned*) ret_u);
89+ return safe_atou_full(s, base, (unsigned*) ret_u);
90+}
91+
92+static inline int safe_atou32(const char *s, uint32_t *ret_u) {
93+ return safe_atou32_full(s, 0, (unsigned*) ret_u);
94 }
95
96 static inline int safe_atoi32(const char *s, int32_t *ret_i) {
diff --git a/meta/recipes-core/systemd/systemd_245.6.bb b/meta/recipes-core/systemd/systemd_246.bb
index cdafb98247..a463aab1e3 100644
--- a/meta/recipes-core/systemd/systemd_245.6.bb
+++ b/meta/recipes-core/systemd/systemd_246.bb
@@ -20,7 +20,9 @@ SRC_URI += "file://touchscreen.rules \
20 file://99-default.preset \ 20 file://99-default.preset \
21 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ 21 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
22 file://0003-implment-systemd-sysv-install-for-OE.patch \ 22 file://0003-implment-systemd-sysv-install-for-OE.patch \
23 file://CVE-2020-13776.patch \ 23 file://0021-Handle-missing-LOCK_EX.patch \
24 file://0022-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \
25 file://0023-Fix-field-efi_loader_entry_one_shot_stat-has-incompl.patch \
24 " 26 "
25 27
26# patches needed by musl 28# patches needed by musl
@@ -605,6 +607,7 @@ FILES_udev += "${base_sbindir}/udevd \
605 ${rootlibexecdir}/udev/v4l_id \ 607 ${rootlibexecdir}/udev/v4l_id \
606 ${rootlibexecdir}/udev/keymaps \ 608 ${rootlibexecdir}/udev/keymaps \
607 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \ 609 ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
610 ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \
608 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ 611 ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
609 ${rootlibexecdir}/udev/rules.d/60-block.rules \ 612 ${rootlibexecdir}/udev/rules.d/60-block.rules \
610 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \ 613 ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \