summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-basic-linux-Sync-if_arp.h-with-Linux-5.14.patch29
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch25
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-src-login-brightness.c-include-sys-wait.h.patch25
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-src-basic-copy.c-include-signal.h.patch27
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0005-src-basic-missing.h-check-for-missing-strndupa.patch442
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0006-Include-netinet-if_ether.h.patch227
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/7c5fd25119a495009ea62f79e5daec34cc464628.patch53
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/static-libsystemd-pkgconfig.patch11
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-don-t-use-glibc-specific-qsort_r.patch)132
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch)49
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-add-fallback-parse_printf_format-implementation.patch)53
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch694
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-Include-netinet-if_ether.h.patch382
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch)34
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0008-add-missing-FTW_-macros-for-musl.patch)24
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch)14
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0011-Use-uintmax_t-for-handling-rlim_t.patch)37
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch)15
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch)25
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch)20
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch)11
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch)50
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch)12
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0020-missing_type.h-add-__compar_d_fn_t-definition.patch)10
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0021-avoid-redefinition-of-prctl_mm_map-structure.patch)12
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch24
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch38
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0024-test-json.c-define-M_PIl.patch)12
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-do-not-disable-buffer-in-writing-files.patch)261
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch)16
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch171
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch34
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/static-libsystemd-pkgconfig.patch9
-rw-r--r--meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_249.bb (renamed from meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb)46
34 files changed, 1768 insertions, 1256 deletions
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-basic-linux-Sync-if_arp.h-with-Linux-5.14.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-basic-linux-Sync-if_arp.h-with-Linux-5.14.patch
deleted file mode 100644
index a251e3e6c2..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-basic-linux-Sync-if_arp.h-with-Linux-5.14.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 4411a9a3ebff98b6fcf5967c75faa458d219df96 Mon Sep 17 00:00:00 2001
2From: Chris Packham <chris.packham@alliedtelesis.co.nz>
3Date: Fri, 10 Sep 2021 09:51:36 +1200
4Subject: [PATCH] basic/linux: Sync if_arp.h with Linux 5.14
5
6ARPHRD_MCTP was added in 5.14. Sync if_arp.h to pick up the definition
7
8Fixes #20694
9Upstream-Status: Backport [https://github.com/cpackham-atlnz/systemd/commit/67cd626399b0d02882ee00716c8bd31ba764c862]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/basic/linux/if_arp.h | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/basic/linux/if_arp.h b/src/basic/linux/if_arp.h
16index c3cc5a9e5e..4783af9fe5 100644
17--- a/src/basic/linux/if_arp.h
18+++ b/src/basic/linux/if_arp.h
19@@ -54,6 +54,7 @@
20 #define ARPHRD_X25 271 /* CCITT X.25 */
21 #define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
22 #define ARPHRD_CAN 280 /* Controller Area Network */
23+#define ARPHRD_MCTP 290
24 #define ARPHRD_PPP 512
25 #define ARPHRD_CISCO 513 /* Cisco HDLC */
26 #define ARPHRD_HDLC ARPHRD_CISCO
27--
282.33.1
29
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch
deleted file mode 100644
index d3d339d56d..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-meson-Fix-reallocarray-check.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 1ebf1a1df17afd8b89f84b1928a89069035bf20b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Dec 2020 16:15:57 -0800
4Subject: [PATCH] meson: Fix reallocarray check
5
6reallocarray() is defined in stdlib.h, so that would be right header to
7check for its presense.
8
9Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/17951]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 meson.build | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15--- a/meson.build
16+++ b/meson.build
17@@ -501,7 +501,7 @@ foreach ident : [
18 #include <sys/stat.h>
19 #include <unistd.h>'''],
20 ['explicit_bzero' , '''#include <string.h>'''],
21- ['reallocarray', '''#include <malloc.h>'''],
22+ ['reallocarray', '''#include <stdlib.h>'''],
23 ['set_mempolicy', '''#include <stdlib.h>
24 #include <unistd.h>'''],
25 ['get_mempolicy', '''#include <stdlib.h>
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-src-login-brightness.c-include-sys-wait.h.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-src-login-brightness.c-include-sys-wait.h.patch
deleted file mode 100644
index dcae668dcb..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-src-login-brightness.c-include-sys-wait.h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1Include sys/wait.h
2
3Fixes:
4src/login/logind-brightness.c:158:85: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'?
5 158 | r = sd_event_add_child(w->manager->event, &w->child_event_source, w->child, WEXITED, on_brightness_writer_exit, w);
6 | ^~~~~~~
7
8Upstream-Status: Pending
9
10Signed-off-by: Scott Murray <scott.murray@konsulko.com>
11---
12 src/login/logind-brightness.c | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/src/login/logind-brightness.c b/src/login/logind-brightness.c
16index 8dfa97d7ae..bddd4a2727 100644
17--- a/src/login/logind-brightness.c
18+++ b/src/login/logind-brightness.c
19@@ -1,5 +1,6 @@
20 /* SPDX-License-Identifier: LGPL-2.1+ */
21
22+#include <sys/wait.h>
23 #include "bus-util.h"
24 #include "device-util.h"
25 #include "hash-funcs.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-src-basic-copy.c-include-signal.h.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-src-basic-copy.c-include-signal.h.patch
deleted file mode 100644
index 7ee0d48fa6..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-src-basic-copy.c-include-signal.h.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Include signal.h
2
3Fixes several signal set related errors:
4src/basic/copy.c:92:19: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]
5src/basic/copy.c:93:19: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration]
6src/basic/copy.c:93:34: error: 'SIGINT' undeclared (first use in this function)
7src/basic/copy.c:95:13: error: implicit declaration of function 'sigtimedwait' [-Werror=implicit-function-declaration]
8
9Upstream-Status: Pending
10
11Signed-off-by: Scott Murray <scott.murray@konsulko.com>
12---
13 src/basic/copy.c | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/src/basic/copy.c b/src/basic/copy.c
17index ca311e021e..3cf7fc1697 100644
18--- a/src/basic/copy.c
19+++ b/src/basic/copy.c
20@@ -12,6 +12,7 @@
21 #include <sys/xattr.h>
22 #include <time.h>
23 #include <unistd.h>
24+#include <signal.h>
25
26 #include "alloc-util.h"
27 #include "btrfs-util.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0005-src-basic-missing.h-check-for-missing-strndupa.patch
deleted file mode 100644
index adfc3b7861..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ /dev/null
@@ -1,442 +0,0 @@
1From 399fd3eda3045636a70da438a0fd1406cc332ed1 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 14:18:21 +0800
4Subject: [PATCH 05/24] src/basic/missing.h: check for missing strndupa
5
6include missing.h for definition of strndupa
7
8Upstream-Status: Inappropriate [musl specific]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12[Rebased for v242]
13Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
14[rebased for systemd 243]
15Signed-off-by: Scott Murray <scott.murray@konsulko.com>
16---
17 meson.build | 1 +
18 src/backlight/backlight.c | 1 +
19 src/basic/env-util.c | 1 +
20 src/basic/missing_stdlib.h | 12 ++++++++++++
21 src/basic/mkdir.c | 1 +
22 src/basic/parse-util.c | 1 +
23 src/basic/proc-cmdline.c | 1 +
24 src/basic/procfs-util.c | 1 +
25 src/basic/time-util.c | 1 +
26 src/core/dbus-cgroup.c | 1 +
27 src/core/dbus-util.c | 1 +
28 src/core/kmod-setup.c | 1 +
29 src/core/service.c | 1 +
30 src/journal/journalctl.c | 1 +
31 src/libsystemd/sd-bus/bus-message.c | 1 +
32 src/libsystemd/sd-bus/bus-objects.c | 1 +
33 src/libsystemd/sd-bus/test-bus-benchmark.c | 1 +
34 src/locale/keymap-util.c | 1 +
35 src/login/pam_systemd.c | 1 +
36 src/network/generator/network-generator.c | 1 +
37 src/nspawn/nspawn-settings.c | 1 +
38 src/shared/dns-domain.c | 1 +
39 src/shared/journal-importer.c | 1 +
40 src/shared/logs-show.c | 1 +
41 src/shared/pager.c | 1 +
42 src/shared/path-lookup.c | 1 +
43 src/shared/uid-range.c | 1 +
44 src/socket-proxy/socket-proxyd.c | 1 +
45 src/test/test-hexdecoct.c | 1 +
46 src/udev/udev-builtin-path_id.c | 1 +
47 src/udev/udev-event.c | 1 +
48 src/udev/udev-rules.c | 1 +
49 32 files changed, 43 insertions(+)
50
51diff --git a/meson.build b/meson.build
52index 7f8c679411..81c061b768 100644
53--- a/meson.build
54+++ b/meson.build
55@@ -506,6 +506,7 @@ foreach ident : [
56 #include <unistd.h>'''],
57 ['get_mempolicy', '''#include <stdlib.h>
58 #include <unistd.h>'''],
59+ ['strndupa' , '''#include <string.h>'''],
60 ]
61
62 have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
63diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
64index dfd6805398..c2b2ace6ec 100644
65--- a/src/backlight/backlight.c
66+++ b/src/backlight/backlight.c
67@@ -17,6 +17,7 @@
68 #include "string-util.h"
69 #include "strv.h"
70 #include "util.h"
71+#include "missing.h"
72
73 static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
74 const char *subsystem, *sysname, *value;
75diff --git a/src/basic/env-util.c b/src/basic/env-util.c
76index a6503cf2b6..ceef9a62c8 100644
77--- a/src/basic/env-util.c
78+++ b/src/basic/env-util.c
79@@ -16,6 +16,7 @@
80 #include "string-util.h"
81 #include "strv.h"
82 #include "utf8.h"
83+#include "missing.h"
84
85 #define VALID_CHARS_ENV_NAME \
86 DIGITS LETTERS \
87diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
88index 188a8d4406..1e16ec287a 100644
89--- a/src/basic/missing_stdlib.h
90+++ b/src/basic/missing_stdlib.h
91@@ -11,3 +11,15 @@
92 # error "neither secure_getenv nor __secure_getenv are available"
93 # endif
94 #endif
95+
96+/* string.h */
97+#if ! HAVE_STRNDUPA
98+#define strndupa(s, n) \
99+ ({ \
100+ const char *__old = (s); \
101+ size_t __len = strnlen(__old, (n)); \
102+ char *__new = (char *)alloca(__len + 1); \
103+ __new[__len] = '\0'; \
104+ (char *)memcpy(__new, __old, __len); \
105+ })
106+#endif
107diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
108index 6b82eab640..51c6b78615 100644
109--- a/src/basic/mkdir.c
110+++ b/src/basic/mkdir.c
111@@ -14,6 +14,7 @@
112 #include "stat-util.h"
113 #include "stdio-util.h"
114 #include "user-util.h"
115+#include "missing.h"
116
117 int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags, mkdir_func_t _mkdir) {
118 struct stat st;
119diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
120index 115a1494a2..07a34bfd53 100644
121--- a/src/basic/parse-util.c
122+++ b/src/basic/parse-util.c
123@@ -20,6 +20,7 @@
124 #include "process-util.h"
125 #include "stat-util.h"
126 #include "string-util.h"
127+#include "missing.h"
128
129 int parse_boolean(const char *v) {
130 if (!v)
131diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
132index 09169cf963..f411ba897f 100644
133--- a/src/basic/proc-cmdline.c
134+++ b/src/basic/proc-cmdline.c
135@@ -15,6 +15,7 @@
136 #include "string-util.h"
137 #include "util.h"
138 #include "virt.h"
139+#include "missing.h"
140
141 int proc_cmdline(char **ret) {
142 const char *e;
143diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
144index 7aaf95bfce..42ce53d5aa 100644
145--- a/src/basic/procfs-util.c
146+++ b/src/basic/procfs-util.c
147@@ -11,6 +11,7 @@
148 #include "procfs-util.h"
149 #include "stdio-util.h"
150 #include "string-util.h"
151+#include "missing.h"
152
153 int procfs_tasks_get_limit(uint64_t *ret) {
154 _cleanup_free_ char *value = NULL;
155diff --git a/src/basic/time-util.c b/src/basic/time-util.c
156index 3018e81acb..4e2b3b66c1 100644
157--- a/src/basic/time-util.c
158+++ b/src/basic/time-util.c
159@@ -28,6 +28,7 @@
160 #include "string-util.h"
161 #include "strv.h"
162 #include "time-util.h"
163+#include "missing.h"
164
165 static clockid_t map_clock_id(clockid_t c) {
166
167diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
168index 2f2313c599..c9937f9d62 100644
169--- a/src/core/dbus-cgroup.c
170+++ b/src/core/dbus-cgroup.c
171@@ -15,6 +15,7 @@
172 #include "fileio.h"
173 #include "limits-util.h"
174 #include "path-util.h"
175+#include "missing.h"
176
177 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
178
179diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
180index 7862beaacb..19f6968cfe 100644
181--- a/src/core/dbus-util.c
182+++ b/src/core/dbus-util.c
183@@ -7,6 +7,7 @@
184 #include "unit-printf.h"
185 #include "user-util.h"
186 #include "unit.h"
187+#include "missing.h"
188
189 int bus_property_get_triggered_unit(
190 sd_bus *bus,
191diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
192index a91cfebc67..a45961013f 100644
193--- a/src/core/kmod-setup.c
194+++ b/src/core/kmod-setup.c
195@@ -11,6 +11,7 @@
196 #include "kmod-setup.h"
197 #include "macro.h"
198 #include "string-util.h"
199+#include "missing.h"
200
201 #if HAVE_KMOD
202 #include <libkmod.h>
203diff --git a/src/core/service.c b/src/core/service.c
204index 73b3c9c316..ef74f00a08 100644
205--- a/src/core/service.c
206+++ b/src/core/service.c
207@@ -43,6 +43,7 @@
208 #include "unit.h"
209 #include "utf8.h"
210 #include "util.h"
211+#include "missing.h"
212
213 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
214 [SERVICE_DEAD] = UNIT_INACTIVE,
215diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
216index 6d6bb1cf63..6666349a35 100644
217--- a/src/journal/journalctl.c
218+++ b/src/journal/journalctl.c
219@@ -70,6 +70,7 @@
220 #include "unit-name.h"
221 #include "user-util.h"
222 #include "varlink.h"
223+#include "missing.h"
224
225 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
226
227diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
228index eb029e4453..f31fe9d5a8 100644
229--- a/src/libsystemd/sd-bus/bus-message.c
230+++ b/src/libsystemd/sd-bus/bus-message.c
231@@ -21,6 +21,7 @@
232 #include "strv.h"
233 #include "time-util.h"
234 #include "utf8.h"
235+#include "missing.h"
236
237 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
238
239diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
240index ae643cacc7..1b752271a5 100644
241--- a/src/libsystemd/sd-bus/bus-objects.c
242+++ b/src/libsystemd/sd-bus/bus-objects.c
243@@ -13,6 +13,7 @@
244 #include "set.h"
245 #include "string-util.h"
246 #include "strv.h"
247+#include "missing.h"
248
249 static int node_vtable_get_userdata(
250 sd_bus *bus,
251diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
252index 8de0a859ee..4fd0a2e692 100644
253--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
254+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
255@@ -14,6 +14,7 @@
256 #include "missing_resource.h"
257 #include "time-util.h"
258 #include "util.h"
259+#include "missing.h"
260
261 #define MAX_SIZE (2*1024*1024)
262
263diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
264index f8c36c94f5..41f5606aea 100644
265--- a/src/locale/keymap-util.c
266+++ b/src/locale/keymap-util.c
267@@ -22,6 +22,7 @@
268 #include "string-util.h"
269 #include "strv.h"
270 #include "tmpfile-util.h"
271+#include "missing.h"
272
273 static bool startswith_comma(const char *s, const char *prefix) {
274 s = startswith(s, prefix);
275diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
276index 3f762cbbc3..005cfea658 100644
277--- a/src/login/pam_systemd.c
278+++ b/src/login/pam_systemd.c
279@@ -28,6 +28,7 @@
280 #include "hostname-util.h"
281 #include "login-util.h"
282 #include "macro.h"
283+#include "missing.h"
284 #include "parse-util.h"
285 #include "path-util.h"
286 #include "process-util.h"
287diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
288index 0b5af33566..9c808cd014 100644
289--- a/src/network/generator/network-generator.c
290+++ b/src/network/generator/network-generator.c
291@@ -13,6 +13,7 @@
292 #include "string-table.h"
293 #include "string-util.h"
294 #include "strv.h"
295+#include "missing.h"
296
297 /*
298 # .network
299diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
300index 3a99736813..279fea4d88 100644
301--- a/src/nspawn/nspawn-settings.c
302+++ b/src/nspawn/nspawn-settings.c
303@@ -16,6 +16,7 @@
304 #include "strv.h"
305 #include "user-util.h"
306 #include "util.h"
307+#include "missing.h"
308
309 Settings *settings_new(void) {
310 Settings *s;
311diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
312index f62ad0a0f5..f1a27e158d 100644
313--- a/src/shared/dns-domain.c
314+++ b/src/shared/dns-domain.c
315@@ -24,6 +24,7 @@
316 #include "string-util.h"
317 #include "strv.h"
318 #include "utf8.h"
319+#include "missing.h"
320
321 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
322 const char *n;
323diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
324index 7c4fc7021d..a6ff2214df 100644
325--- a/src/shared/journal-importer.c
326+++ b/src/shared/journal-importer.c
327@@ -14,6 +14,7 @@
328 #include "parse-util.h"
329 #include "string-util.h"
330 #include "unaligned.h"
331+#include "missing.h"
332
333 enum {
334 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
335diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
336index b615c70dff..75b26e9c21 100644
337--- a/src/shared/logs-show.c
338+++ b/src/shared/logs-show.c
339@@ -39,6 +39,7 @@
340 #include "time-util.h"
341 #include "utf8.h"
342 #include "util.h"
343+#include "missing.h"
344
345 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
346 #define PRINT_LINE_THRESHOLD 3
347diff --git a/src/shared/pager.c b/src/shared/pager.c
348index 7c20b100b4..e4209d3a95 100644
349--- a/src/shared/pager.c
350+++ b/src/shared/pager.c
351@@ -25,6 +25,7 @@
352 #include "strv.h"
353 #include "terminal-util.h"
354 #include "util.h"
355+#include "missing.h"
356
357 static pid_t pager_pid = 0;
358
359diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
360index 6bf0ff0316..f6c8009cd2 100644
361--- a/src/shared/path-lookup.c
362+++ b/src/shared/path-lookup.c
363@@ -20,6 +20,7 @@
364 #include "tmpfile-util.h"
365 #include "user-util.h"
366 #include "util.h"
367+#include "missing.h"
368
369 int xdg_user_runtime_dir(char **ret, const char *suffix) {
370 const char *e;
371diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
372index 7cb7d8a477..8b12b91084 100644
373--- a/src/shared/uid-range.c
374+++ b/src/shared/uid-range.c
375@@ -9,6 +9,7 @@
376 #include "sort-util.h"
377 #include "uid-range.h"
378 #include "user-util.h"
379+#include "missing.h"
380
381 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
382 assert(range);
383diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
384index abbbc9f2d6..6179b5851e 100644
385--- a/src/socket-proxy/socket-proxyd.c
386+++ b/src/socket-proxy/socket-proxyd.c
387@@ -28,6 +28,7 @@
388 #include "socket-util.h"
389 #include "string-util.h"
390 #include "util.h"
391+#include "missing.h"
392
393 #define BUFFER_SIZE (256 * 1024)
394
395diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
396index 52217429b1..a05e7782f6 100644
397--- a/src/test/test-hexdecoct.c
398+++ b/src/test/test-hexdecoct.c
399@@ -6,6 +6,7 @@
400 #include "hexdecoct.h"
401 #include "macro.h"
402 #include "string-util.h"
403+#include "missing.h"
404
405 static void test_hexchar(void) {
406 assert_se(hexchar(0xa) == 'a');
407diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
408index e8f1ce1354..8693cb02a4 100644
409--- a/src/udev/udev-builtin-path_id.c
410+++ b/src/udev/udev-builtin-path_id.c
411@@ -23,6 +23,7 @@
412 #include "strv.h"
413 #include "sysexits.h"
414 #include "udev-builtin.h"
415+#include "missing.h"
416
417 _printf_(2,3)
418 static void path_prepend(char **path, const char *fmt, ...) {
419diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
420index 8cfa2cdf23..b0670c77ec 100644
421--- a/src/udev/udev-event.c
422+++ b/src/udev/udev-event.c
423@@ -35,6 +35,7 @@
424 #include "udev-util.h"
425 #include "udev-watch.h"
426 #include "user-util.h"
427+#include "missing.h"
428
429 typedef struct Spawn {
430 sd_device *device;
431diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
432index 1642f10535..fe2aa75478 100644
433--- a/src/udev/udev-rules.c
434+++ b/src/udev/udev-rules.c
435@@ -28,6 +28,7 @@
436 #include "udev-event.h"
437 #include "udev-rules.h"
438 #include "user-util.h"
439+#include "missing.h"
440
441 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
442
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0006-Include-netinet-if_ether.h.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0006-Include-netinet-if_ether.h.patch
deleted file mode 100644
index 6d73d715ce..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0006-Include-netinet-if_ether.h.patch
+++ /dev/null
@@ -1,227 +0,0 @@
1Include netinet/if_ether.h
2
3Fixes
4/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
5 struct ethhdr {
6 ^~~~~~
7
8and related arphdr, arpreq, and arpreq_old errors
9/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
10 struct arphdr {
11 ^~~~~~
12
13The latter requires removing some includes of net/if_arp.h to avoid
14conflicting with netinet/if_ether.h.
15
16Upstream-Status: Inappropriate [musl specific]
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20[rebased for systemd 243]
21Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22
23Upstream-Status: Inappropriate [musl specific]
24
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
27[rebased for systemd 243]
28Signed-off-by: Scott Murray <scott.murray@konsulko.com>
29---
30 src/libsystemd-network/sd-dhcp6-client.c | 1 -
31 src/libsystemd/sd-netlink/netlink-types.c | 1 +
32 src/machine/machine-dbus.c | 1 +
33 src/network/netdev/macsec.c | 1 +
34 src/network/netdev/netdev.c | 1 +
35 src/network/networkd-brvlan.c | 1 +
36 src/network/networkd-dhcp-common.c | 1 +
37 src/network/networkd-dhcp4.c | 2 +-
38 src/network/networkd-dhcp6.c | 2 +-
39 src/network/networkd-link.c | 2 +-
40 src/network/networkd-network.c | 1 +
41 src/shared/ethtool-util.c | 1 +
42 src/shared/ethtool-util.h | 1 +
43 src/udev/net/link-config.c | 1 +
44 src/udev/udev-builtin-net_setup_link.c | 1 +
45 15 files changed, 14 insertions(+), 4 deletions(-)
46
47diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
48index d7a5349c70..68b41dfb6c 100644
49--- a/src/libsystemd-network/sd-dhcp6-client.c
50+++ b/src/libsystemd-network/sd-dhcp6-client.c
51@@ -6,7 +6,6 @@
52 #include <errno.h>
53 #include <string.h>
54 #include <sys/ioctl.h>
55-#include <linux/if_arp.h>
56 #include <linux/if_infiniband.h>
57
58 #include "sd-dhcp6-client.h"
59diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
60index de9b8b21ab..f64f6500f7 100644
61--- a/src/libsystemd/sd-netlink/netlink-types.c
62+++ b/src/libsystemd/sd-netlink/netlink-types.c
63@@ -3,6 +3,7 @@
64 #include <netinet/in.h>
65 #include <stdint.h>
66 #include <sys/socket.h>
67+#include <netinet/if_ether.h>
68 #include <linux/can/vxcan.h>
69 #include <linux/netlink.h>
70 #include <linux/rtnetlink.h>
71diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
72index 0d58b5eb8b..01093c1f62 100644
73--- a/src/machine/machine-dbus.c
74+++ b/src/machine/machine-dbus.c
75@@ -4,6 +4,7 @@
76 #include <string.h>
77 #include <sys/mount.h>
78 #include <sys/wait.h>
79+#include <netinet/if_ether.h>
80
81 /* When we include libgen.h because we need dirname() we immediately
82 * undefine basename() since libgen.h defines it as a macro to the POSIX
83diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
84index cf281e75a6..269dc618ff 100644
85--- a/src/network/netdev/macsec.c
86+++ b/src/network/netdev/macsec.c
87@@ -1,5 +1,6 @@
88 /* SPDX-License-Identifier: LGPL-2.1+ */
89
90+#include <netinet/if_ether.h>
91 #include <netinet/in.h>
92 #include <linux/if_ether.h>
93 #include <linux/if_macsec.h>
94diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
95index 7735b455b7..ed4eda4a44 100644
96--- a/src/network/netdev/netdev.c
97+++ b/src/network/netdev/netdev.c
98@@ -1,5 +1,6 @@
99 /* SPDX-License-Identifier: LGPL-2.1+ */
100
101+#include <netinet/if_ether.h>
102 #include <net/if.h>
103 #include <netinet/in.h>
104
105diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
106index c3c5d535ac..ebea408c89 100644
107--- a/src/network/networkd-brvlan.c
108+++ b/src/network/networkd-brvlan.c
109@@ -4,6 +4,7 @@
110 ***/
111
112 #include <netinet/in.h>
113+#include <netinet/if_ether.h>
114 #include <linux/if_bridge.h>
115 #include <stdbool.h>
116
117diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
118index 626b975839..42fe92f320 100644
119--- a/src/network/networkd-dhcp-common.c
120+++ b/src/network/networkd-dhcp-common.c
121@@ -1,6 +1,7 @@
122 /* SPDX-License-Identifier: LGPL-2.1+ */
123
124 #include "networkd-dhcp-common.h"
125+#include <netinet/if_ether.h>
126 #include "networkd-network.h"
127 #include "parse-util.h"
128 #include "string-table.h"
129diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
130index 662770b50e..c6ab62a94d 100644
131--- a/src/network/networkd-dhcp4.c
132+++ b/src/network/networkd-dhcp4.c
133@@ -1,8 +1,8 @@
134 /* SPDX-License-Identifier: LGPL-2.1+ */
135
136+#include <netinet/if_ether.h>
137 #include <netinet/in.h>
138 #include <linux/if.h>
139-#include <linux/if_arp.h>
140
141 #include "alloc-util.h"
142 #include "hostname-util.h"
143diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
144index 8ad736a82b..f41b4d834e 100644
145--- a/src/network/networkd-dhcp6.c
146+++ b/src/network/networkd-dhcp6.c
147@@ -3,9 +3,9 @@
148 Copyright © 2014 Intel Corporation. All rights reserved.
149 ***/
150
151+#include <netinet/if_ether.h>
152 #include <netinet/in.h>
153 #include <linux/if.h>
154-#include <linux/if_arp.h>
155 #include "sd-radv.h"
156
157 #include "sd-dhcp6-client.h"
158diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
159index f5bb78890a..f13a36b791 100644
160--- a/src/network/networkd-link.c
161+++ b/src/network/networkd-link.c
162@@ -1,8 +1,8 @@
163 /* SPDX-License-Identifier: LGPL-2.1+ */
164
165+#include <netinet/if_ether.h>
166 #include <netinet/in.h>
167 #include <linux/if.h>
168-#include <linux/if_arp.h>
169 #include <unistd.h>
170
171 #include "alloc-util.h"
172diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
173index 2b8d0eb2fb..2f79ef25cd 100644
174--- a/src/network/networkd-network.c
175+++ b/src/network/networkd-network.c
176@@ -1,5 +1,6 @@
177 /* SPDX-License-Identifier: LGPL-2.1+ */
178
179+#include <netinet/if_ether.h>
180 #include <net/if.h>
181 #include <netinet/in.h>
182 #include <linux/netdevice.h>
183diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
184index b0961df72e..53fcbbd84b 100644
185--- a/src/shared/ethtool-util.c
186+++ b/src/shared/ethtool-util.c
187@@ -1,5 +1,6 @@
188 /* SPDX-License-Identifier: LGPL-2.1+ */
189
190+#include <netinet/if_ether.h>
191 #include <net/if.h>
192 #include <sys/ioctl.h>
193 #include <linux/ethtool.h>
194diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
195index 8b32b243f3..262b819976 100644
196--- a/src/shared/ethtool-util.h
197+++ b/src/shared/ethtool-util.h
198@@ -2,6 +2,7 @@
199 #pragma once
200
201 #include <macro.h>
202+#include <netinet/if_ether.h>
203 #include <linux/ethtool.h>
204
205 #include "conf-parser.h"
206diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
207index d44af64d5e..fd052f1591 100644
208--- a/src/udev/net/link-config.c
209+++ b/src/udev/net/link-config.c
210@@ -1,5 +1,6 @@
211 /* SPDX-License-Identifier: LGPL-2.1+ */
212
213+#include <netinet/if_ether.h>
214 #include <linux/netdevice.h>
215 #include <netinet/ether.h>
216
217diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
218index ee3ca9fa38..9aa4e82874 100644
219--- a/src/udev/udev-builtin-net_setup_link.c
220+++ b/src/udev/udev-builtin-net_setup_link.c
221@@ -1,5 +1,6 @@
222 /* SPDX-License-Identifier: LGPL-2.1+ */
223
224+#include <netinet/if_ether.h>
225 #include "device-util.h"
226 #include "alloc-util.h"
227 #include "link-config.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/7c5fd25119a495009ea62f79e5daec34cc464628.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/7c5fd25119a495009ea62f79e5daec34cc464628.patch
deleted file mode 100644
index ae449791f1..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/7c5fd25119a495009ea62f79e5daec34cc464628.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 7c5fd25119a495009ea62f79e5daec34cc464628 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
3Date: Mon, 12 Apr 2021 14:03:32 +0200
4Subject: [PATCH] meson: do not fail if rsync is not installed with meson
5 0.57.2
6
7https://github.com/mesonbuild/meson/issues/8641
8
9Our CI started to fail. Even if the change is reverted in meson,
10we need a quick workaround here.
11
12Upstream-Status: Backport
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14---
15 man/meson.build | 25 ++++++++++++++-----------
16 1 file changed, 14 insertions(+), 11 deletions(-)
17
18diff --git a/man/meson.build b/man/meson.build
19index 3cae8446cda..f9c4b83dc81 100644
20--- a/man/meson.build
21+++ b/man/meson.build
22@@ -184,17 +184,20 @@ html = custom_target(
23 depends : html_pages,
24 command : ['echo'])
25
26-run_target(
27- 'doc-sync',
28- depends : man_pages + html_pages,
29- command : ['rsync', '-rlv',
30- '--delete-excluded',
31- '--include=man',
32- '--include=*.html',
33- '--exclude=*',
34- '--omit-dir-times',
35- meson.current_build_dir(),
36- get_option('www-target')])
37+rsync = find_program('rsync', required : false)
38+if rsync.found()
39+ run_target(
40+ 'doc-sync',
41+ depends : man_pages + html_pages,
42+ command : [rsync, '-rlv',
43+ '--delete-excluded',
44+ '--include=man',
45+ '--include=*.html',
46+ '--exclude=*',
47+ '--omit-dir-times',
48+ meson.current_build_dir(),
49+ get_option('www-target')])
50+endif
51
52 ############################################################
53
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/static-libsystemd-pkgconfig.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/static-libsystemd-pkgconfig.patch
deleted file mode 100644
index eb018bbcc4..0000000000
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/static-libsystemd-pkgconfig.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1Index: git/src/libsystemd/libsystemd.pc.in
2===================================================================
3--- git.orig/src/libsystemd/libsystemd.pc.in
4+++ git/src/libsystemd/libsystemd.pc.in
5@@ -16,5 +16,5 @@ Name: systemd
6 Description: systemd Library
7 URL: @PROJECT_URL@
8 Version: @PROJECT_VERSION@
9-Libs: -L${libdir} -lsystemd
10+Libs: -L${libdir} -lsystemd -lrt -lmount -lcap
11 Cflags: -I${includedir}
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-don-t-use-glibc-specific-qsort_r.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch
index c6213ab88e..f233ee6621 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0002-don-t-use-glibc-specific-qsort_r.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch
@@ -1,7 +1,7 @@
1From 1eb84534dea05d41afed1d898cba212ad7d310dd Mon Sep 17 00:00:00 2001 1From 30bd749c6777701496124272b59e1283252c3267 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 13:41:41 +0800 3Date: Mon, 25 Feb 2019 13:41:41 +0800
4Subject: [PATCH 02/24] don't use glibc-specific qsort_r 4Subject: [PATCH] don't use glibc-specific qsort_r
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
@@ -10,21 +10,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 10Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11[Rebased for v242] 11[Rebased for v242]
12Signed-off-by: Andrej Valek <andrej.valek@siemens.com> 12Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
13[Rebased for v247]
14Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
15
13--- 16---
14 src/basic/sort-util.h | 14 -------------- 17 src/basic/sort-util.h | 14 --------------
15 src/libsystemd/sd-hwdb/hwdb-util.c | 19 ++++++++++++++----- 18 src/shared/format-table.c | 36 ++++++++++++++++++++++++------------
16 src/shared/format-table.c | 36 ++++++++++++++++++++++++------------ 19 src/shared/hwdb-util.c | 19 ++++++++++++++-----
17 3 files changed, 38 insertions(+), 31 deletions(-) 20 3 files changed, 38 insertions(+), 31 deletions(-)
18 21
19diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h 22diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
20index e029f8646e..27d68b341c 100644 23index 49586a4a24..d92a5ab0ed 100644
21--- a/src/basic/sort-util.h 24--- a/src/basic/sort-util.h
22+++ b/src/basic/sort-util.h 25+++ b/src/basic/sort-util.h
23@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn 26@@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f
24 int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ 27 _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
25 qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
26 }) 28 })
27- 29
28-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { 30-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
29- if (nmemb <= 1) 31- if (nmemb <= 1)
30- return; 32- return;
@@ -38,55 +40,13 @@ index e029f8646e..27d68b341c 100644
38- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ 40- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
39- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ 41- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
40- }) 42- })
41diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c 43-
42index c83575c7c8..72f8f3a050 100644 44 int cmp_int(const int *a, const int *b);
43--- a/src/libsystemd/sd-hwdb/hwdb-util.c
44+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
45@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) {
46
47 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
48
49-static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
50- return strcmp(trie->strings->buf + a->key_off,
51- trie->strings->buf + b->key_off);
52+static struct trie *trie_node_add_value_trie;
53+static int trie_values_cmp(const void *v1, const void *v2) {
54+ const struct trie_value_entry *a = v1;
55+ const struct trie_value_entry *b = v2;
56+
57+ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
58+ trie_node_add_value_trie->strings->buf + b->key_off);
59 }
60
61 static int trie_node_add_value(struct trie *trie, struct trie_node *node,
62@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
63 .value_off = v,
64 };
65
66- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
67+ trie_node_add_value_trie = trie;
68+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
69+ trie_node_add_value_trie = NULL;
70+
71 if (val) {
72 /* At this point we have 2 identical properties on the same match-string.
73 * Since we process files in order, we just replace the previous value. */
74@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
75 .line_number = line_number,
76 };
77 node->values_count++;
78- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
79+ trie_node_add_value_trie = trie;
80+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
81+ trie_node_add_value_trie = NULL;
82 return 0;
83 }
84
85diff --git a/src/shared/format-table.c b/src/shared/format-table.c 45diff --git a/src/shared/format-table.c b/src/shared/format-table.c
86index a5c0a99b08..d595cbe372 100644 46index 4c4e4593d8..17b329f315 100644
87--- a/src/shared/format-table.c 47--- a/src/shared/format-table.c
88+++ b/src/shared/format-table.c 48+++ b/src/shared/format-table.c
89@@ -850,31 +850,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t 49@@ -1282,30 +1282,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
90 return CMP(index_a, index_b); 50 return CMP(index_a, index_b);
91 } 51 }
92 52
@@ -94,7 +54,6 @@ index a5c0a99b08..d595cbe372 100644
94+static Table *user_table; 54+static Table *user_table;
95+static int table_data_compare(const void *x, const void *y) { 55+static int table_data_compare(const void *x, const void *y) {
96+ const size_t *a = x, *b=y; 56+ const size_t *a = x, *b=y;
97 size_t i;
98 int r; 57 int r;
99 58
100- assert(t); 59- assert(t);
@@ -114,8 +73,8 @@ index a5c0a99b08..d595cbe372 100644
114 return 1; 73 return 1;
115 74
116 /* Order other lines by the sorting map */ 75 /* Order other lines by the sorting map */
117- for (i = 0; i < t->n_sort_map; i++) { 76- for (size_t i = 0; i < t->n_sort_map; i++) {
118+ for (i = 0; i < user_table->n_sort_map; i++) { 77+ for (size_t i = 0; i < user_table->n_sort_map; i++) {
119 TableData *d, *dd; 78 TableData *d, *dd;
120 79
121- d = t->data[*a + t->sort_map[i]]; 80- d = t->data[*a + t->sort_map[i]];
@@ -130,8 +89,8 @@ index a5c0a99b08..d595cbe372 100644
130 } 89 }
131 90
132 /* Order identical lines by the order there were originally added in */ 91 /* Order identical lines by the order there were originally added in */
133@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) { 92@@ -1944,7 +1946,12 @@ int table_print(Table *t, FILE *f) {
134 for (i = 0; i < n_rows; i++) 93 for (size_t i = 0; i < n_rows; i++)
135 sorted[i] = i * t->n_columns; 94 sorted[i] = i * t->n_columns;
136 95
137- typesafe_qsort_r(sorted, n_rows, table_data_compare, t); 96- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
@@ -144,8 +103,8 @@ index a5c0a99b08..d595cbe372 100644
144 } 103 }
145 104
146 if (t->display_map) 105 if (t->display_map)
147@@ -1534,7 +1541,12 @@ int table_to_json(Table *t, JsonVariant **ret) { 106@@ -2572,7 +2579,12 @@ int table_to_json(Table *t, JsonVariant **ret) {
148 for (i = 0; i < n_rows; i++) 107 for (size_t i = 0; i < n_rows; i++)
149 sorted[i] = i * t->n_columns; 108 sorted[i] = i * t->n_columns;
150 109
151- typesafe_qsort_r(sorted, n_rows, table_data_compare, t); 110- typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
@@ -158,6 +117,47 @@ index a5c0a99b08..d595cbe372 100644
158 } 117 }
159 118
160 if (t->display_map) 119 if (t->display_map)
161-- 120diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c
1622.11.0 121index d7626aed95..2003fac7c3 100644
163 122--- a/src/shared/hwdb-util.c
123+++ b/src/shared/hwdb-util.c
124@@ -127,9 +127,13 @@ static struct trie* trie_free(struct trie *trie) {
125
126 DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free);
127
128-static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) {
129- return strcmp(trie->strings->buf + a->key_off,
130- trie->strings->buf + b->key_off);
131+static struct trie *trie_node_add_value_trie;
132+static int trie_values_cmp(const void *v1, const void *v2) {
133+ const struct trie_value_entry *a = v1;
134+ const struct trie_value_entry *b = v2;
135+
136+ return strcmp(trie_node_add_value_trie->strings->buf + a->key_off,
137+ trie_node_add_value_trie->strings->buf + b->key_off);
138 }
139
140 static int trie_node_add_value(struct trie *trie, struct trie_node *node,
141@@ -157,7 +161,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
142 .value_off = v,
143 };
144
145- val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie);
146+ trie_node_add_value_trie = trie;
147+ val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
148+ trie_node_add_value_trie = NULL;
149+
150 if (val) {
151 /* At this point we have 2 identical properties on the same match-string.
152 * Since we process files in order, we just replace the previous value. */
153@@ -183,7 +190,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
154 .line_number = line_number,
155 };
156 node->values_count++;
157- typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie);
158+ trie_node_add_value_trie = trie;
159+ qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp);
160+ trie_node_add_value_trie = NULL;
161 return 0;
162 }
163
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
index 2e39f7a2e1..a51ab0ab2e 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
@@ -1,24 +1,28 @@
1From a9421d55102fc84f77f7c21a2479fcd00652b896 Mon Sep 17 00:00:00 2001 1From 4dba0a3b1372ce34d8b6e150a108123a1b2b0b96 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 13:55:12 +0800 3Date: Mon, 25 Feb 2019 13:55:12 +0800
4Subject: [PATCH 03/24] missing_type.h: add __compare_fn_t and comparison_fn_t 4Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t
5 5
6Make it work with musl where comparison_fn_t and __compare_fn_t 6Make it work with musl where comparison_fn_t and __compare_fn_t
7is not provided. 7is not provided.
8 8
9Upstream-Status: Inappropriate [musl specific] 9Upstream-Status: Inappropriate [musl specific]
10 10
11Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
12[Rebased for v244]
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12[Rebased for v242] 14[Rebased for v242]
13Signed-off-by: Andrej Valek <andrej.valek@siemens.com> 15Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
16
14--- 17---
15 src/basic/missing_type.h | 9 +++++++++ 18 src/basic/missing_type.h | 9 +++++++++
16 src/basic/sort-util.h | 1 + 19 src/basic/sort-util.h | 1 +
17 src/journal/catalog.c | 1 + 20 src/core/kmod-setup.c | 1 +
18 3 files changed, 11 insertions(+) 21 src/libsystemd/sd-journal/catalog.c | 1 +
22 4 files changed, 12 insertions(+)
19 23
20diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h 24diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
21index bf8a6caa1b..2134fe5095 100644 25index f6233090a9..aeaf6ad5ec 100644
22--- a/src/basic/missing_type.h 26--- a/src/basic/missing_type.h
23+++ b/src/basic/missing_type.h 27+++ b/src/basic/missing_type.h
24@@ -10,3 +10,12 @@ 28@@ -10,3 +10,12 @@
@@ -35,29 +39,38 @@ index bf8a6caa1b..2134fe5095 100644
35+typedef int (*__compar_fn_t)(const void *, const void *); 39+typedef int (*__compar_fn_t)(const void *, const void *);
36+#endif 40+#endif
37diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h 41diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
38index e029f86..7247d40 100644 42index d92a5ab0ed..a63867c716 100644
39--- a/src/basic/sort-util.h 43--- a/src/basic/sort-util.h
40+++ b/src/basic/sort-util.h 44+++ b/src/basic/sort-util.h
41@@ -4,6 +4,7 @@ 45@@ -4,6 +4,7 @@
42 #include <stdlib.h> 46 #include <stdlib.h>
43 47
44 #include "macro.h" 48 #include "macro.h"
45+#include "missing.h" 49+#include "missing_type.h"
46 50
47 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, 51 void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
48 __compar_d_fn_t compar, void *arg); 52 __compar_d_fn_t compar, void *arg);
49diff --git a/src/journal/catalog.c b/src/journal/catalog.c 53diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
50index 7beffc1e1a..4818a2e5cc 100644 54index 8a7f82812a..a56f12f47f 100644
51--- a/src/journal/catalog.c 55--- a/src/core/kmod-setup.c
52+++ b/src/journal/catalog.c 56+++ b/src/core/kmod-setup.c
53@@ -29,6 +29,7 @@ 57@@ -10,6 +10,7 @@
58 #include "kmod-setup.h"
59 #include "macro.h"
60 #include "string-util.h"
61+#include "missing_type.h"
62
63 #if HAVE_KMOD
64 #include "module-util.h"
65diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
66index ce8d47ccc3..00845f9776 100644
67--- a/src/libsystemd/sd-journal/catalog.c
68+++ b/src/libsystemd/sd-journal/catalog.c
69@@ -28,6 +28,7 @@
54 #include "string-util.h" 70 #include "string-util.h"
55 #include "strv.h" 71 #include "strv.h"
56 #include "tmpfile-util.h" 72 #include "tmpfile-util.h"
57+#include "missing.h" 73+#include "missing_type.h"
58 74
59 const char * const catalog_file_dirs[] = { 75 const char * const catalog_file_dirs[] = {
60 "/usr/local/lib/systemd/catalog/", 76 "/usr/local/lib/systemd/catalog/",
61--
622.11.0
63
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-add-fallback-parse_printf_format-implementation.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch
index a2aad40ac2..3c07f6005f 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-add-fallback-parse_printf_format-implementation.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -1,7 +1,7 @@
1From 7bcf3b166694090497a0acd2c5299e4e04fcc9b6 Mon Sep 17 00:00:00 2001 1From 842d231165f0d564c51d93650820e4fa7f097c3e Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 25 Feb 2019 14:04:21 +0800 3Date: Sat, 22 May 2021 20:26:24 +0200
4Subject: [PATCH 04/24] add fallback parse_printf_format implementation 4Subject: [PATCH] add fallback parse_printf_format implementation
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
@@ -10,22 +10,23 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 10Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11[rebased for systemd 243] 11[rebased for systemd 243]
12Signed-off-by: Scott Murray <scott.murray@konsulko.com> 12Signed-off-by: Scott Murray <scott.murray@konsulko.com>
13
13--- 14---
14 meson.build | 1 + 15 meson.build | 1 +
15 src/basic/meson.build | 5 + 16 src/basic/meson.build | 5 +
16 src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++ 17 src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++
17 src/basic/parse-printf-format.h | 57 +++++++++ 18 src/basic/parse-printf-format.h | 57 +++++
18 src/basic/stdio-util.h | 2 +- 19 src/basic/stdio-util.h | 2 +-
19 src/journal/journal-send.c | 2 +- 20 src/libsystemd/sd-journal/journal-send.c | 2 +-
20 6 files changed, 338 insertions(+), 2 deletions(-) 21 6 files changed, 338 insertions(+), 2 deletions(-)
21 create mode 100644 src/basic/parse-printf-format.c 22 create mode 100644 src/basic/parse-printf-format.c
22 create mode 100644 src/basic/parse-printf-format.h 23 create mode 100644 src/basic/parse-printf-format.h
23 24
24diff --git a/meson.build b/meson.build 25diff --git a/meson.build b/meson.build
25index 79b762faeb..7f8c679411 100644 26index b5a51b6d0d..11cf56efee 100644
26--- a/meson.build 27--- a/meson.build
27+++ b/meson.build 28+++ b/meson.build
28@@ -613,6 +613,7 @@ endif 29@@ -656,6 +656,7 @@ endif
29 foreach header : ['crypt.h', 30 foreach header : ['crypt.h',
30 'linux/memfd.h', 31 'linux/memfd.h',
31 'linux/vm_sockets.h', 32 'linux/vm_sockets.h',
@@ -34,21 +35,21 @@ index 79b762faeb..7f8c679411 100644
34 'valgrind/memcheck.h', 35 'valgrind/memcheck.h',
35 'valgrind/valgrind.h', 36 'valgrind/valgrind.h',
36diff --git a/src/basic/meson.build b/src/basic/meson.build 37diff --git a/src/basic/meson.build b/src/basic/meson.build
37index d6caf28f14..32c1acf349 100644 38index 452b965db3..4e64d883dc 100644
38--- a/src/basic/meson.build 39--- a/src/basic/meson.build
39+++ b/src/basic/meson.build 40+++ b/src/basic/meson.build
40@@ -312,6 +312,11 @@ foreach item : [['af', af_list_txt, 'af', ''], 41@@ -321,6 +321,11 @@ endforeach
41 endforeach
42 42
43 basic_sources += generated_gperf_headers 43 basic_sources += generated_gperf_headers
44+ 44
45+if conf.get('HAVE_PRINTF_H') != 1 45+if conf.get('HAVE_PRINTF_H') != 1
46+ basic_sources += [files('parse-printf-format.c')] 46+ basic_sources += [files('parse-printf-format.c')]
47+endif 47+endif
48+ 48+
49 basic_gcrypt_sources = files( 49+
50 'gcrypt-util.c', 50 ############################################################
51 'gcrypt-util.h') 51
52 arch_list = [
52diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c 53diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c
53new file mode 100644 54new file mode 100644
54index 0000000000..49437e5445 55index 0000000000..49437e5445
@@ -392,11 +393,11 @@ index 0000000000..47be7522d7
392+ 393+
393+#endif /* HAVE_PRINTF_H */ 394+#endif /* HAVE_PRINTF_H */
394diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h 395diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
395index c3b9448d4f..2937aa13b1 100644 396index 6dc1e72312..cea76b36cf 100644
396--- a/src/basic/stdio-util.h 397--- a/src/basic/stdio-util.h
397+++ b/src/basic/stdio-util.h 398+++ b/src/basic/stdio-util.h
398@@ -1,13 +1,13 @@ 399@@ -1,13 +1,13 @@
399 /* SPDX-License-Identifier: LGPL-2.1+ */ 400 /* SPDX-License-Identifier: LGPL-2.1-or-later */
400 #pragma once 401 #pragma once
401 402
402-#include <printf.h> 403-#include <printf.h>
@@ -410,18 +411,18 @@ index c3b9448d4f..2937aa13b1 100644
410 411
411 #define snprintf_ok(buf, len, fmt, ...) \ 412 #define snprintf_ok(buf, len, fmt, ...) \
412 ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) 413 ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
413diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c 414diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
414index 5ef11fa1a4..6384ab620c 100644 415index fd3fd7ef9c..e8e6ad555b 100644
415--- a/src/journal/journal-send.c 416--- a/src/libsystemd/sd-journal/journal-send.c
416+++ b/src/journal/journal-send.c 417+++ b/src/libsystemd/sd-journal/journal-send.c
417@@ -2,7 +2,6 @@ 418@@ -2,7 +2,6 @@
418 419
419 #include <errno.h> 420 #include <errno.h>
420 #include <fcntl.h> 421 #include <fcntl.h>
421-#include <printf.h> 422-#include <printf.h>
422 #include <stddef.h> 423 #include <stddef.h>
423 #include <sys/socket.h>
424 #include <sys/un.h> 424 #include <sys/un.h>
425 #include <unistd.h>
425@@ -21,6 +20,7 @@ 426@@ -21,6 +20,7 @@
426 #include "stdio-util.h" 427 #include "stdio-util.h"
427 #include "string-util.h" 428 #include "string-util.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
new file mode 100644
index 0000000000..1b9e194667
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -0,0 +1,694 @@
1From 95c61768e1f8d76a7bd28355429fc4b7b428ad61 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 25 Feb 2019 14:18:21 +0800
4Subject: [PATCH] src/basic/missing.h: check for missing strndupa
5
6include missing.h for definition of strndupa
7
8Upstream-Status: Inappropriate [musl specific]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12[Rebased for v242]
13Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
14[rebased for systemd 243]
15Signed-off-by: Scott Murray <scott.murray@konsulko.com>
16Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
17[rebased for systemd 244]
18[Rebased for v247]
19Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
20
21---
22 meson.build | 1 +
23 src/backlight/backlight.c | 1 +
24 src/basic/cgroup-util.c | 1 +
25 src/basic/env-util.c | 1 +
26 src/basic/log.c | 1 +
27 src/basic/missing_stdlib.h | 12 ++++++++++++
28 src/basic/mkdir.c | 1 +
29 src/basic/mountpoint-util.c | 1 +
30 src/basic/parse-util.c | 1 +
31 src/basic/path-lookup.c | 1 +
32 src/basic/percent-util.c | 1 +
33 src/basic/proc-cmdline.c | 1 +
34 src/basic/procfs-util.c | 1 +
35 src/basic/time-util.c | 1 +
36 src/boot/bless-boot.c | 1 +
37 src/core/dbus-cgroup.c | 1 +
38 src/core/dbus-execute.c | 1 +
39 src/core/dbus-util.c | 1 +
40 src/core/execute.c | 1 +
41 src/core/kmod-setup.c | 1 +
42 src/core/service.c | 1 +
43 src/coredump/coredump-vacuum.c | 1 +
44 src/journal-remote/journal-remote-main.c | 1 +
45 src/journal/journalctl.c | 1 +
46 src/libsystemd/sd-bus/bus-message.c | 1 +
47 src/libsystemd/sd-bus/bus-objects.c | 1 +
48 src/libsystemd/sd-bus/bus-socket.c | 1 +
49 src/libsystemd/sd-bus/sd-bus.c | 1 +
50 src/libsystemd/sd-bus/test-bus-benchmark.c | 1 +
51 src/libsystemd/sd-journal/sd-journal.c | 1 +
52 src/locale/keymap-util.c | 1 +
53 src/login/pam_systemd.c | 1 +
54 src/network/generator/network-generator.c | 1 +
55 src/nspawn/nspawn-settings.c | 1 +
56 src/nss-mymachines/nss-mymachines.c | 1 +
57 src/portable/portable.c | 1 +
58 src/resolve/resolvectl.c | 1 +
59 src/shared/bus-get-properties.c | 1 +
60 src/shared/bus-unit-procs.c | 1 +
61 src/shared/bus-unit-util.c | 1 +
62 src/shared/bus-util.c | 1 +
63 src/shared/dns-domain.c | 1 +
64 src/shared/journal-importer.c | 1 +
65 src/shared/logs-show.c | 1 +
66 src/shared/pager.c | 1 +
67 src/shared/uid-range.c | 1 +
68 src/socket-proxy/socket-proxyd.c | 1 +
69 src/test/test-hexdecoct.c | 1 +
70 src/udev/udev-builtin-path_id.c | 1 +
71 src/udev/udev-event.c | 1 +
72 src/udev/udev-rules.c | 1 +
73 51 files changed, 62 insertions(+)
74
75diff --git a/meson.build b/meson.build
76index 11cf56efee..5bd6602e03 100644
77--- a/meson.build
78+++ b/meson.build
79@@ -480,6 +480,7 @@ foreach ident : ['secure_getenv', '__secure_getenv']
80 endforeach
81
82 foreach ident : [
83+ ['strndupa' , '''#include <string.h>'''],
84 ['memfd_create', '''#include <sys/mman.h>'''],
85 ['gettid', '''#include <sys/types.h>
86 #include <unistd.h>'''],
87diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
88index 7c0970a60c..c129ff0f4f 100644
89--- a/src/backlight/backlight.c
90+++ b/src/backlight/backlight.c
91@@ -19,6 +19,7 @@
92 #include "string-util.h"
93 #include "strv.h"
94 #include "util.h"
95+#include "missing_stdlib.h"
96
97 static int help(void) {
98 _cleanup_free_ char *link = NULL;
99diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
100index 1ff6160dc8..c9efd862a2 100644
101--- a/src/basic/cgroup-util.c
102+++ b/src/basic/cgroup-util.c
103@@ -38,6 +38,7 @@
104 #include "unit-name.h"
105 #include "user-util.h"
106 #include "xattr-util.h"
107+#include "missing_stdlib.h"
108
109 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) {
110 _cleanup_free_ char *fs = NULL;
111diff --git a/src/basic/env-util.c b/src/basic/env-util.c
112index 1ca445dab4..1f5a212d4e 100644
113--- a/src/basic/env-util.c
114+++ b/src/basic/env-util.c
115@@ -18,6 +18,7 @@
116 #include "string-util.h"
117 #include "strv.h"
118 #include "utf8.h"
119+#include "missing_stdlib.h"
120
121 /* We follow bash for the character set. Different shells have different rules. */
122 #define VALID_BASH_ENV_NAME_CHARS \
123diff --git a/src/basic/log.c b/src/basic/log.c
124index fb183ea9e7..82e7bdff60 100644
125--- a/src/basic/log.c
126+++ b/src/basic/log.c
127@@ -36,6 +36,7 @@
128 #include "terminal-util.h"
129 #include "time-util.h"
130 #include "utf8.h"
131+#include "missing_stdlib.h"
132
133 #define SNDBUF_SIZE (8*1024*1024)
134
135diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
136index 8c76f93eb2..9068bfb4f0 100644
137--- a/src/basic/missing_stdlib.h
138+++ b/src/basic/missing_stdlib.h
139@@ -11,3 +11,15 @@
140 # error "neither secure_getenv nor __secure_getenv are available"
141 # endif
142 #endif
143+
144+/* string.h */
145+#if ! HAVE_STRNDUPA
146+#define strndupa(s, n) \
147+ ({ \
148+ const char *__old = (s); \
149+ size_t __len = strnlen(__old, (n)); \
150+ char *__new = (char *)alloca(__len + 1); \
151+ __new[__len] = '\0'; \
152+ (char *)memcpy(__new, __old, __len); \
153+ })
154+#endif
155diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
156index f91f8f7a08..fb31596216 100644
157--- a/src/basic/mkdir.c
158+++ b/src/basic/mkdir.c
159@@ -14,6 +14,7 @@
160 #include "stat-util.h"
161 #include "stdio-util.h"
162 #include "user-util.h"
163+#include "missing_stdlib.h"
164
165 int mkdir_safe_internal(
166 const char *path,
167diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c
168index e7a5a99551..3cc157f248 100644
169--- a/src/basic/mountpoint-util.c
170+++ b/src/basic/mountpoint-util.c
171@@ -11,6 +11,7 @@
172 #include "missing_stat.h"
173 #include "missing_syscall.h"
174 #include "mkdir.h"
175+#include "missing_stdlib.h"
176 #include "mountpoint-util.h"
177 #include "parse-util.h"
178 #include "path-util.h"
179diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
180index b79c885dfd..6dabda5691 100644
181--- a/src/basic/parse-util.c
182+++ b/src/basic/parse-util.c
183@@ -19,6 +19,7 @@
184 #include "stat-util.h"
185 #include "string-util.h"
186 #include "strv.h"
187+#include "missing_stdlib.h"
188
189 int parse_boolean(const char *v) {
190 if (!v)
191diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c
192index 05eb17d66c..b6026aab28 100644
193--- a/src/basic/path-lookup.c
194+++ b/src/basic/path-lookup.c
195@@ -15,6 +15,7 @@
196 #include "strv.h"
197 #include "tmpfile-util.h"
198 #include "user-util.h"
199+#include "missing_stdlib.h"
200
201 int xdg_user_runtime_dir(char **ret, const char *suffix) {
202 const char *e;
203diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c
204index 06f20fd61e..8159d721bb 100644
205--- a/src/basic/percent-util.c
206+++ b/src/basic/percent-util.c
207@@ -3,6 +3,7 @@
208 #include "percent-util.h"
209 #include "string-util.h"
210 #include "parse-util.h"
211+#include "missing_stdlib.h"
212
213 static int parse_parts_value_whole(const char *p, const char *symbol) {
214 const char *pc, *n;
215diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
216index 410b8a3eb5..f2c4355609 100644
217--- a/src/basic/proc-cmdline.c
218+++ b/src/basic/proc-cmdline.c
219@@ -15,6 +15,7 @@
220 #include "string-util.h"
221 #include "util.h"
222 #include "virt.h"
223+#include "missing_stdlib.h"
224
225 int proc_cmdline(char **ret) {
226 const char *e;
227diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
228index 9234ccaf85..8c57094225 100644
229--- a/src/basic/procfs-util.c
230+++ b/src/basic/procfs-util.c
231@@ -11,6 +11,7 @@
232 #include "procfs-util.h"
233 #include "stdio-util.h"
234 #include "string-util.h"
235+#include "missing_stdlib.h"
236
237 int procfs_tasks_get_limit(uint64_t *ret) {
238 _cleanup_free_ char *value = NULL;
239diff --git a/src/basic/time-util.c b/src/basic/time-util.c
240index 5d162e8ffe..1cde8e4262 100644
241--- a/src/basic/time-util.c
242+++ b/src/basic/time-util.c
243@@ -26,6 +26,7 @@
244 #include "string-util.h"
245 #include "strv.h"
246 #include "time-util.h"
247+#include "missing_stdlib.h"
248
249 static clockid_t map_clock_id(clockid_t c) {
250
251diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c
252index 3fc319ca27..90064c90f3 100644
253--- a/src/boot/bless-boot.c
254+++ b/src/boot/bless-boot.c
255@@ -18,6 +18,7 @@
256 #include "util.h"
257 #include "verbs.h"
258 #include "virt.h"
259+#include "missing_stdlib.h"
260
261 static char **arg_path = NULL;
262
263diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
264index 84c3caf3a5..0fa84eaa38 100644
265--- a/src/core/dbus-cgroup.c
266+++ b/src/core/dbus-cgroup.c
267@@ -20,6 +20,7 @@
268 #include "parse-util.h"
269 #include "path-util.h"
270 #include "percent-util.h"
271+#include "missing_stdlib.h"
272
273 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
274
275diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
276index 902e074bd2..ac15b944e6 100644
277--- a/src/core/dbus-execute.c
278+++ b/src/core/dbus-execute.c
279@@ -42,6 +42,7 @@
280 #include "unit-printf.h"
281 #include "user-util.h"
282 #include "utf8.h"
283+#include "missing_stdlib.h"
284
285 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
286 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput);
287diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
288index ca9b399d8c..b864480a8c 100644
289--- a/src/core/dbus-util.c
290+++ b/src/core/dbus-util.c
291@@ -9,6 +9,7 @@
292 #include "unit-printf.h"
293 #include "user-util.h"
294 #include "unit.h"
295+#include "missing_stdlib.h"
296
297 int bus_property_get_triggered_unit(
298 sd_bus *bus,
299diff --git a/src/core/execute.c b/src/core/execute.c
300index 2a337b55a2..2a64675c5f 100644
301--- a/src/core/execute.c
302+++ b/src/core/execute.c
303@@ -98,6 +98,7 @@
304 #include "unit-serialize.h"
305 #include "user-util.h"
306 #include "utmp-wtmp.h"
307+#include "missing_stdlib.h"
308
309 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
310 #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
311diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
312index a56f12f47f..6b8729ef67 100644
313--- a/src/core/kmod-setup.c
314+++ b/src/core/kmod-setup.c
315@@ -11,6 +11,7 @@
316 #include "macro.h"
317 #include "string-util.h"
318 #include "missing_type.h"
319+#include "missing_stdlib.h"
320
321 #if HAVE_KMOD
322 #include "module-util.h"
323diff --git a/src/core/service.c b/src/core/service.c
324index 701c145565..4ddc20ed7e 100644
325--- a/src/core/service.c
326+++ b/src/core/service.c
327@@ -41,6 +41,7 @@
328 #include "unit.h"
329 #include "utf8.h"
330 #include "util.h"
331+#include "missing_stdlib.h"
332
333 static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
334 [SERVICE_DEAD] = UNIT_INACTIVE,
335diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c
336index 95c3fca661..d4a9f27b08 100644
337--- a/src/coredump/coredump-vacuum.c
338+++ b/src/coredump/coredump-vacuum.c
339@@ -16,6 +16,7 @@
340 #include "string-util.h"
341 #include "time-util.h"
342 #include "user-util.h"
343+#include "missing_stdlib.h"
344
345 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */
346 #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */
347diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
348index ae1d43756a..24de98c9f3 100644
349--- a/src/journal-remote/journal-remote-main.c
350+++ b/src/journal-remote/journal-remote-main.c
351@@ -24,6 +24,7 @@
352 #include "stat-util.h"
353 #include "string-table.h"
354 #include "strv.h"
355+#include "missing_stdlib.h"
356
357 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem"
358 #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem"
359diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
360index 3eac97510d..db6913bc7a 100644
361--- a/src/journal/journalctl.c
362+++ b/src/journal/journalctl.c
363@@ -72,6 +72,7 @@
364 #include "unit-name.h"
365 #include "user-util.h"
366 #include "varlink.h"
367+#include "missing_stdlib.h"
368
369 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
370 #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */
371diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
372index 20f7396c74..3471311ef5 100644
373--- a/src/libsystemd/sd-bus/bus-message.c
374+++ b/src/libsystemd/sd-bus/bus-message.c
375@@ -20,6 +20,7 @@
376 #include "strv.h"
377 #include "time-util.h"
378 #include "utf8.h"
379+#include "missing_stdlib.h"
380
381 static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
382
383diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
384index bfd42aea7d..daefc56e3e 100644
385--- a/src/libsystemd/sd-bus/bus-objects.c
386+++ b/src/libsystemd/sd-bus/bus-objects.c
387@@ -12,6 +12,7 @@
388 #include "set.h"
389 #include "string-util.h"
390 #include "strv.h"
391+#include "missing_stdlib.h"
392
393 static int node_vtable_get_userdata(
394 sd_bus *bus,
395diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
396index 378774fe8b..2694c177d5 100644
397--- a/src/libsystemd/sd-bus/bus-socket.c
398+++ b/src/libsystemd/sd-bus/bus-socket.c
399@@ -27,6 +27,7 @@
400 #include "string-util.h"
401 #include "user-util.h"
402 #include "utf8.h"
403+#include "missing_stdlib.h"
404
405 #define SNDBUF_SIZE (8*1024*1024)
406
407diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
408index a32e2f5e20..97fd3aec82 100644
409--- a/src/libsystemd/sd-bus/sd-bus.c
410+++ b/src/libsystemd/sd-bus/sd-bus.c
411@@ -42,6 +42,7 @@
412 #include "string-util.h"
413 #include "strv.h"
414 #include "user-util.h"
415+#include "missing_stdlib.h"
416
417 #define log_debug_bus_message(m) \
418 do { \
419diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
420index 13c08fe295..9aae83486e 100644
421--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
422+++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
423@@ -14,6 +14,7 @@
424 #include "string-util.h"
425 #include "time-util.h"
426 #include "util.h"
427+#include "missing_stdlib.h"
428
429 #define MAX_SIZE (2*1024*1024)
430
431diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c
432index b3240177cb..7e3ae2d24f 100644
433--- a/src/libsystemd/sd-journal/sd-journal.c
434+++ b/src/libsystemd/sd-journal/sd-journal.c
435@@ -40,6 +40,7 @@
436 #include "string-util.h"
437 #include "strv.h"
438 #include "syslog-util.h"
439+#include "missing_stdlib.h"
440
441 #define JOURNAL_FILES_MAX 7168
442
443diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
444index d2f0566dbc..3b7746557e 100644
445--- a/src/locale/keymap-util.c
446+++ b/src/locale/keymap-util.c
447@@ -24,6 +24,7 @@
448 #include "string-util.h"
449 #include "strv.h"
450 #include "tmpfile-util.h"
451+#include "missing_stdlib.h"
452
453 static bool startswith_comma(const char *s, const char *prefix) {
454 s = startswith(s, prefix);
455diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
456index f8bd17eefe..9633fbc152 100644
457--- a/src/login/pam_systemd.c
458+++ b/src/login/pam_systemd.c
459@@ -31,6 +31,7 @@
460 #include "locale-util.h"
461 #include "login-util.h"
462 #include "macro.h"
463+#include "missing_stdlib.h"
464 #include "pam-util.h"
465 #include "parse-util.h"
466 #include "path-util.h"
467diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c
468index 60e074e99b..a728e3b7a1 100644
469--- a/src/network/generator/network-generator.c
470+++ b/src/network/generator/network-generator.c
471@@ -13,6 +13,7 @@
472 #include "string-table.h"
473 #include "string-util.h"
474 #include "strv.h"
475+#include "missing_stdlib.h"
476
477 /*
478 # .network
479diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
480index 3847fe4ec4..3696b57baa 100644
481--- a/src/nspawn/nspawn-settings.c
482+++ b/src/nspawn/nspawn-settings.c
483@@ -17,6 +17,7 @@
484 #include "strv.h"
485 #include "user-util.h"
486 #include "util.h"
487+#include "missing_stdlib.h"
488
489 Settings *settings_new(void) {
490 Settings *s;
491diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
492index 44715bb3e5..bc1e688b5e 100644
493--- a/src/nss-mymachines/nss-mymachines.c
494+++ b/src/nss-mymachines/nss-mymachines.c
495@@ -21,6 +21,7 @@
496 #include "nss-util.h"
497 #include "signal-util.h"
498 #include "string-util.h"
499+#include "missing_stdlib.h"
500
501 static void setup_logging(void) {
502 /* We need a dummy function because log_parse_environment is a macro. */
503diff --git a/src/portable/portable.c b/src/portable/portable.c
504index 4cf5fb4f0a..577dc5c8d7 100644
505--- a/src/portable/portable.c
506+++ b/src/portable/portable.c
507@@ -34,6 +34,7 @@
508 #include "strv.h"
509 #include "tmpfile-util.h"
510 #include "user-util.h"
511+#include "missing_stdlib.h"
512
513 static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile");
514
515diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
516index 7d13ed3905..ddc37115b8 100644
517--- a/src/resolve/resolvectl.c
518+++ b/src/resolve/resolvectl.c
519@@ -41,6 +41,7 @@
520 #include "terminal-util.h"
521 #include "utf8.h"
522 #include "verbs.h"
523+#include "missing_stdlib.h"
524
525 static int arg_family = AF_UNSPEC;
526 static int arg_ifindex = 0;
527diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c
528index feb6d3807f..eb11d29e50 100644
529--- a/src/shared/bus-get-properties.c
530+++ b/src/shared/bus-get-properties.c
531@@ -4,6 +4,7 @@
532 #include "rlimit-util.h"
533 #include "stdio-util.h"
534 #include "string-util.h"
535+#include "missing_stdlib.h"
536
537 int bus_property_get_bool(
538 sd_bus *bus,
539diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c
540index 6f4a71138c..4a46de2c1b 100644
541--- a/src/shared/bus-unit-procs.c
542+++ b/src/shared/bus-unit-procs.c
543@@ -10,6 +10,7 @@
544 #include "sort-util.h"
545 #include "string-util.h"
546 #include "terminal-util.h"
547+#include "missing_stdlib.h"
548
549 struct CGroupInfo {
550 char *cgroup_path;
551diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
552index d3a5b25d18..003594e2d7 100644
553--- a/src/shared/bus-unit-util.c
554+++ b/src/shared/bus-unit-util.c
555@@ -47,6 +47,7 @@
556 #include "unit-def.h"
557 #include "user-util.h"
558 #include "utf8.h"
559+#include "missing_stdlib.h"
560
561 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
562 assert(message);
563diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
564index 64ca67993c..31e3d148ea 100644
565--- a/src/shared/bus-util.c
566+++ b/src/shared/bus-util.c
567@@ -21,6 +21,7 @@
568 #include "path-util.h"
569 #include "socket-util.h"
570 #include "stdio-util.h"
571+#include "missing_stdlib.h"
572
573 static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
574 sd_event *e = userdata;
575diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
576index 787bb8fec9..009589a16f 100644
577--- a/src/shared/dns-domain.c
578+++ b/src/shared/dns-domain.c
579@@ -17,6 +17,7 @@
580 #include "string-util.h"
581 #include "strv.h"
582 #include "utf8.h"
583+#include "missing_stdlib.h"
584
585 int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
586 const char *n;
587diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
588index 9e11dc09c1..f9954c1520 100644
589--- a/src/shared/journal-importer.c
590+++ b/src/shared/journal-importer.c
591@@ -15,6 +15,7 @@
592 #include "parse-util.h"
593 #include "string-util.h"
594 #include "unaligned.h"
595+#include "missing_stdlib.h"
596
597 enum {
598 IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
599diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
600index e63c59bd94..dd9773c009 100644
601--- a/src/shared/logs-show.c
602+++ b/src/shared/logs-show.c
603@@ -41,6 +41,7 @@
604 #include "utf8.h"
605 #include "util.h"
606 #include "web-util.h"
607+#include "missing_stdlib.h"
608
609 /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
610 #define PRINT_LINE_THRESHOLD 3
611diff --git a/src/shared/pager.c b/src/shared/pager.c
612index 4bbad7e37b..eefcdd068c 100644
613--- a/src/shared/pager.c
614+++ b/src/shared/pager.c
615@@ -26,6 +26,7 @@
616 #include "strv.h"
617 #include "terminal-util.h"
618 #include "util.h"
619+#include "missing_stdlib.h"
620
621 static pid_t pager_pid = 0;
622
623diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
624index 5d5bf7f21d..f1002ffa6c 100644
625--- a/src/shared/uid-range.c
626+++ b/src/shared/uid-range.c
627@@ -9,6 +9,7 @@
628 #include "sort-util.h"
629 #include "uid-range.h"
630 #include "user-util.h"
631+#include "missing_stdlib.h"
632
633 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
634 assert(range);
635diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
636index 6e3ee0d76b..7727e33d95 100644
637--- a/src/socket-proxy/socket-proxyd.c
638+++ b/src/socket-proxy/socket-proxyd.c
639@@ -26,6 +26,7 @@
640 #include "socket-util.h"
641 #include "string-util.h"
642 #include "util.h"
643+#include "missing_stdlib.h"
644
645 #define BUFFER_SIZE (256 * 1024)
646
647diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
648index c9d318b8d1..fcb8d40805 100644
649--- a/src/test/test-hexdecoct.c
650+++ b/src/test/test-hexdecoct.c
651@@ -6,6 +6,7 @@
652 #include "hexdecoct.h"
653 #include "macro.h"
654 #include "string-util.h"
655+#include "missing_stdlib.h"
656
657 static void test_hexchar(void) {
658 assert_se(hexchar(0xa) == 'a');
659diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
660index 65c40de4c8..4ef9a0c6c8 100644
661--- a/src/udev/udev-builtin-path_id.c
662+++ b/src/udev/udev-builtin-path_id.c
663@@ -22,6 +22,7 @@
664 #include "sysexits.h"
665 #include "udev-builtin.h"
666 #include "udev-util.h"
667+#include "missing_stdlib.h"
668
669 _printf_(2,3)
670 static void path_prepend(char **path, const char *fmt, ...) {
671diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
672index b28089be71..a7e2232299 100644
673--- a/src/udev/udev-event.c
674+++ b/src/udev/udev-event.c
675@@ -34,6 +34,7 @@
676 #include "udev-util.h"
677 #include "udev-watch.h"
678 #include "user-util.h"
679+#include "missing_stdlib.h"
680
681 typedef struct Spawn {
682 sd_device *device;
683diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
684index bf997fc0ed..e3f5f1f2e2 100644
685--- a/src/udev/udev-rules.c
686+++ b/src/udev/udev-rules.c
687@@ -33,6 +33,7 @@
688 #include "udev-util.h"
689 #include "user-util.h"
690 #include "virt.h"
691+#include "missing_stdlib.h"
692
693 #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
694
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-Include-netinet-if_ether.h.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-Include-netinet-if_ether.h.patch
new file mode 100644
index 0000000000..951bebc901
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-Include-netinet-if_ether.h.patch
@@ -0,0 +1,382 @@
1From f95192d87a46a2191cf4ebd47c64e04b138d7fac Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 26 Oct 2017 22:10:42 -0700
4Subject: [PATCH] Include netinet/if_ether.h
5
6Fixes
7/path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr'
8 struct ethhdr {
9 ^~~~~~
10
11and related arphdr, arpreq, and arpreq_old errors
12/path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr'
13 struct arphdr {
14 ^~~~~~
15
16The latter requires removing some includes of net/if_arp.h to avoid
17conflicting with netinet/if_ether.h.
18
19Upstream-Status: Inappropriate [musl specific]
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
23[rebased for systemd 243]
24Signed-off-by: Scott Murray <scott.murray@konsulko.com>
25
26Upstream-Status: Inappropriate [musl specific]
27
28Signed-off-by: Khem Raj <raj.khem@gmail.com>
29Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
30[rebased for systemd 243]
31Signed-off-by: Scott Murray <scott.murray@konsulko.com>
32[rebased for systemd 247]
33Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
34
35---
36 src/basic/linux/in6.h | 14 +++++++-------
37 src/libsystemd-network/sd-dhcp6-client.c | 1 -
38 src/libsystemd/sd-netlink/netlink-types.c | 1 +
39 src/machine/machine-dbus.c | 1 +
40 src/network/netdev/bond.c | 1 +
41 src/network/netdev/bridge.c | 1 +
42 src/network/netdev/macsec.c | 1 +
43 src/network/netdev/netdev-gperf.gperf | 1 +
44 src/network/netdev/netdev.c | 1 +
45 src/network/networkd-bridge-vlan.c | 1 +
46 src/network/networkd-dhcp-common.c | 4 +++-
47 src/network/networkd-dhcp-server.c | 4 ++--
48 src/network/networkd-dhcp4.c | 2 +-
49 src/network/networkd-dhcp6.c | 2 +-
50 src/network/networkd-link.c | 2 +-
51 src/network/networkd-network.c | 1 +
52 src/network/networkd-route.c | 1 +
53 src/network/networkd-setlink.c | 2 +-
54 src/network/test-network-tables.c | 1 +
55 src/shared/ethtool-util.c | 1 +
56 src/shared/ethtool-util.h | 1 +
57 src/udev/net/link-config.c | 1 +
58 src/udev/udev-builtin-net_setup_link.c | 1 +
59 23 files changed, 31 insertions(+), 15 deletions(-)
60
61diff --git a/src/basic/linux/in6.h b/src/basic/linux/in6.h
62index 5ad396a57e..1dc007fe13 100644
63--- a/src/basic/linux/in6.h
64+++ b/src/basic/linux/in6.h
65@@ -1,10 +1,10 @@
66 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
67 /*
68- * Types and definitions for AF_INET6
69- * Linux INET6 implementation
70+ * Types and definitions for AF_INET6
71+ * Linux INET6 implementation
72 *
73 * Authors:
74- * Pedro Roque <roque@di.fc.ul.pt>
75+ * Pedro Roque <roque@di.fc.ul.pt>
76 *
77 * Sources:
78 * IPv6 Program Interfaces for BSD Systems
79@@ -19,8 +19,8 @@
80 * 2 of the License, or (at your option) any later version.
81 */
82
83-#ifndef _UAPI_LINUX_IN6_H
84-#define _UAPI_LINUX_IN6_H
85+#ifndef _LINUX_IN6_H
86+#define _LINUX_IN6_H
87
88 #include <linux/types.h>
89 #include <linux/libc-compat.h>
90@@ -97,7 +97,7 @@ struct in6_flowlabel_req {
91
92
93 /*
94- * Bitmask constant declarations to help applications select out the
95+ * Bitmask constant declarations to help applications select out the
96 * flow label and priority fields.
97 *
98 * Note that this are in host byte order while the flowinfo field of
99@@ -298,4 +298,4 @@ struct in6_flowlabel_req {
100 * ...
101 * MRT6_MAX
102 */
103-#endif /* _UAPI_LINUX_IN6_H */
104+#endif /* _LINUX_IN6_H */
105diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
106index f99c12620b..4966d62656 100644
107--- a/src/libsystemd-network/sd-dhcp6-client.c
108+++ b/src/libsystemd-network/sd-dhcp6-client.c
109@@ -5,7 +5,6 @@
110
111 #include <errno.h>
112 #include <sys/ioctl.h>
113-#include <linux/if_arp.h>
114 #include <linux/if_infiniband.h>
115
116 #include "sd-dhcp6-client.h"
117diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c
118index beb926d40b..41de212242 100644
119--- a/src/libsystemd/sd-netlink/netlink-types.c
120+++ b/src/libsystemd/sd-netlink/netlink-types.c
121@@ -3,6 +3,7 @@
122 #include <netinet/in.h>
123 #include <stdint.h>
124 #include <sys/socket.h>
125+#include <netinet/if_ether.h>
126 #include <linux/can/vxcan.h>
127 #include <linux/netlink.h>
128 #include <linux/rtnetlink.h>
129diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
130index 0022a980c5..fc22e51409 100644
131--- a/src/machine/machine-dbus.c
132+++ b/src/machine/machine-dbus.c
133@@ -3,6 +3,7 @@
134 #include <errno.h>
135 #include <sys/mount.h>
136 #include <sys/wait.h>
137+#include <netinet/if_ether.h>
138
139 /* When we include libgen.h because we need dirname() we immediately
140 * undefine basename() since libgen.h defines it as a macro to the POSIX
141diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
142index a7a4adce45..eb111a6c48 100644
143--- a/src/network/netdev/bond.c
144+++ b/src/network/netdev/bond.c
145@@ -1,5 +1,6 @@
146 /* SPDX-License-Identifier: LGPL-2.1-or-later */
147
148+#include <netinet/if_ether.h>
149 #include "alloc-util.h"
150 #include "bond.h"
151 #include "bond-util.h"
152diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
153index 99fb9e1c3c..ecc6ca91bf 100644
154--- a/src/network/netdev/bridge.c
155+++ b/src/network/netdev/bridge.c
156@@ -1,5 +1,6 @@
157 /* SPDX-License-Identifier: LGPL-2.1-or-later */
158
159+#include <netinet/if_ether.h>
160 #include <net/if.h>
161
162 #include "bridge.h"
163diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
164index 77c5f8c4e7..04be1b4ab2 100644
165--- a/src/network/netdev/macsec.c
166+++ b/src/network/netdev/macsec.c
167@@ -1,5 +1,6 @@
168 /* SPDX-License-Identifier: LGPL-2.1-or-later */
169
170+#include <netinet/if_ether.h>
171 #include <netinet/in.h>
172 #include <linux/if_ether.h>
173 #include <linux/if_macsec.h>
174diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf
175index 9dd081425e..130e5b3d3c 100644
176--- a/src/network/netdev/netdev-gperf.gperf
177+++ b/src/network/netdev/netdev-gperf.gperf
178@@ -3,6 +3,7 @@
179 #if __GNUC__ >= 7
180 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
181 #endif
182+#include <netinet/if_ether.h>
183 #include <stddef.h>
184 #include "bareudp.h"
185 #include "batadv.h"
186diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
187index 53534d4873..1cfda9469f 100644
188--- a/src/network/netdev/netdev.c
189+++ b/src/network/netdev/netdev.c
190@@ -1,5 +1,6 @@
191 /* SPDX-License-Identifier: LGPL-2.1-or-later */
192
193+#include <netinet/if_ether.h>
194 #include <net/if.h>
195 #include <netinet/in.h>
196 #include <unistd.h>
197diff --git a/src/network/networkd-bridge-vlan.c b/src/network/networkd-bridge-vlan.c
198index 3153bf6984..687a26b057 100644
199--- a/src/network/networkd-bridge-vlan.c
200+++ b/src/network/networkd-bridge-vlan.c
201@@ -4,6 +4,7 @@
202 ***/
203
204 #include <netinet/in.h>
205+#include <netinet/if_ether.h>
206 #include <linux/if_bridge.h>
207 #include <stdbool.h>
208
209diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
210index 249d780887..edd2e9adf8 100644
211--- a/src/network/networkd-dhcp-common.c
212+++ b/src/network/networkd-dhcp-common.c
213@@ -1,7 +1,8 @@
214 /* SPDX-License-Identifier: LGPL-2.1-or-later */
215
216 #include <netinet/in.h>
217-#include <linux/if_arp.h>
218+#include <net/if_arp.h>
219+#include <net/if.h>
220
221 #include "bus-error.h"
222 #include "dhcp-identifier.h"
223@@ -13,6 +14,7 @@
224 #include "networkd-dhcp-common.h"
225 #include "networkd-link.h"
226 #include "networkd-manager.h"
227+#include <netinet/if_ether.h>
228 #include "networkd-network.h"
229 #include "parse-util.h"
230 #include "socket-util.h"
231diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
232index 9e2faa5675..fd8d817569 100644
233--- a/src/network/networkd-dhcp-server.c
234+++ b/src/network/networkd-dhcp-server.c
235@@ -1,8 +1,8 @@
236 /* SPDX-License-Identifier: LGPL-2.1-or-later */
237
238 #include <netinet/in.h>
239-#include <linux/if_arp.h>
240-#include <linux/if.h>
241+#include <net/if_arp.h>
242+#include <net/if.h>
243
244 #include "sd-dhcp-server.h"
245
246diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
247index f80adcdbcf..3311e2a718 100644
248--- a/src/network/networkd-dhcp4.c
249+++ b/src/network/networkd-dhcp4.c
250@@ -1,9 +1,9 @@
251 /* SPDX-License-Identifier: LGPL-2.1-or-later */
252
253+#include <netinet/if_ether.h>
254 #include <netinet/in.h>
255 #include <netinet/ip.h>
256 #include <linux/if.h>
257-#include <linux/if_arp.h>
258
259 #include "escape.h"
260 #include "alloc-util.h"
261diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
262index 2b72b618fc..d0d4cfb384 100644
263--- a/src/network/networkd-dhcp6.c
264+++ b/src/network/networkd-dhcp6.c
265@@ -3,9 +3,9 @@
266 Copyright © 2014 Intel Corporation. All rights reserved.
267 ***/
268
269+#include <netinet/if_ether.h>
270 #include <netinet/in.h>
271 #include <linux/if.h>
272-#include <linux/if_arp.h>
273
274 #include "sd-dhcp6-client.h"
275
276diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
277index 20675f2306..2884511ff3 100644
278--- a/src/network/networkd-link.c
279+++ b/src/network/networkd-link.c
280@@ -1,9 +1,9 @@
281 /* SPDX-License-Identifier: LGPL-2.1-or-later */
282
283 #include <net/if.h>
284+#include <netinet/if_ether.h>
285 #include <netinet/in.h>
286 #include <linux/if.h>
287-#include <linux/if_arp.h>
288 #include <linux/if_link.h>
289 #include <linux/netdevice.h>
290 #include <sys/socket.h>
291diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
292index 850b4f449e..6f85d41328 100644
293--- a/src/network/networkd-network.c
294+++ b/src/network/networkd-network.c
295@@ -1,5 +1,6 @@
296 /* SPDX-License-Identifier: LGPL-2.1-or-later */
297
298+#include <netinet/if_ether.h>
299 #include <net/if.h>
300 #include <netinet/in.h>
301 #include <linux/netdevice.h>
302diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
303index 791fd64c39..a2825c920d 100644
304--- a/src/network/networkd-route.c
305+++ b/src/network/networkd-route.c
306@@ -1,5 +1,6 @@
307 /* SPDX-License-Identifier: LGPL-2.1-or-later */
308
309+#include <netinet/in.h>
310 #include <linux/icmpv6.h>
311 #include <linux/ipv6_route.h>
312 #include <linux/nexthop.h>
313diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
314index 13c4cedd10..6558d551ab 100644
315--- a/src/network/networkd-setlink.c
316+++ b/src/network/networkd-setlink.c
317@@ -1,8 +1,8 @@
318 /* SPDX-License-Identifier: LGPL-2.1-or-later */
319
320 #include <netinet/in.h>
321+#include <net/if_arp.h>
322 #include <linux/if.h>
323-#include <linux/if_arp.h>
324
325 #include "missing_network.h"
326 #include "netlink-util.h"
327diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
328index f55e524ae9..83d5c7cef3 100644
329--- a/src/network/test-network-tables.c
330+++ b/src/network/test-network-tables.c
331@@ -1,5 +1,6 @@
332 /* SPDX-License-Identifier: LGPL-2.1-or-later */
333
334+#include <netinet/if_ether.h>
335 #include "bond.h"
336 #include "dhcp6-internal.h"
337 #include "dhcp6-protocol.h"
338diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
339index f77f6943ca..0e1506e04b 100644
340--- a/src/shared/ethtool-util.c
341+++ b/src/shared/ethtool-util.c
342@@ -1,5 +1,6 @@
343 /* SPDX-License-Identifier: LGPL-2.1-or-later */
344
345+#include <netinet/if_ether.h>
346 #include <net/if.h>
347 #include <sys/ioctl.h>
348 #include <linux/ethtool.h>
349diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h
350index 7d28766624..e98a25418b 100644
351--- a/src/shared/ethtool-util.h
352+++ b/src/shared/ethtool-util.h
353@@ -3,6 +3,7 @@
354
355 #include <macro.h>
356 #include <net/ethernet.h>
357+#include <netinet/if_ether.h>
358 #include <linux/ethtool.h>
359
360 #include "conf-parser.h"
361diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
362index 8dfe23691b..e269856337 100644
363--- a/src/udev/net/link-config.c
364+++ b/src/udev/net/link-config.c
365@@ -1,5 +1,6 @@
366 /* SPDX-License-Identifier: LGPL-2.1-or-later */
367
368+#include <netinet/if_ether.h>
369 #include <linux/netdevice.h>
370 #include <netinet/ether.h>
371 #include <unistd.h>
372diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c
373index 5964e30bf1..52a18d7a7f 100644
374--- a/src/udev/udev-builtin-net_setup_link.c
375+++ b/src/udev/udev-builtin-net_setup_link.c
376@@ -1,5 +1,6 @@
377 /* SPDX-License-Identifier: LGPL-2.1-or-later */
378
379+#include <netinet/if_ether.h>
380 #include "alloc-util.h"
381 #include "device-util.h"
382 #include "errno-util.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index 34f7f5fb74..46d0c7acef 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -1,8 +1,7 @@
1From f8a239b182158ca0a537ba053cb0e6bad9c3a2fb Mon Sep 17 00:00:00 2001 1From 9c0d0b61ffa4019b299e4c47f376ae823879dbf3 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:56:21 +0800 3Date: Mon, 25 Feb 2019 14:56:21 +0800
4Subject: [PATCH 07/24] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not 4Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined
5 defined
6 5
7If the standard library doesn't provide brace 6If the standard library doesn't provide brace
8expansion users just won't get it. 7expansion users just won't get it.
@@ -17,6 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 16Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18[rebased for systemd 243] 17[rebased for systemd 243]
19Signed-off-by: Scott Murray <scott.murray@konsulko.com> 18Signed-off-by: Scott Murray <scott.murray@konsulko.com>
19
20--- 20---
21 src/basic/glob-util.c | 12 ++++++++++++ 21 src/basic/glob-util.c | 12 ++++++++++++
22 src/test/test-glob-util.c | 16 ++++++++++++++++ 22 src/test/test-glob-util.c | 16 ++++++++++++++++
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
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 26diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
27index b335af8d97..2cdfc11f16 100644 27index e026b29478..815e56ef68 100644
28--- a/src/basic/glob-util.c 28--- a/src/basic/glob-util.c
29+++ b/src/basic/glob-util.c 29+++ b/src/basic/glob-util.c
30@@ -14,6 +14,12 @@ 30@@ -12,6 +12,12 @@
31 #include "path-util.h" 31 #include "path-util.h"
32 #include "strv.h" 32 #include "strv.h"
33 33
@@ -40,7 +40,7 @@ index b335af8d97..2cdfc11f16 100644
40 static void closedir_wrapper(void* v) { 40 static void closedir_wrapper(void* v) {
41 (void) closedir(v); 41 (void) closedir(v);
42 } 42 }
43@@ -21,6 +27,7 @@ static void closedir_wrapper(void* v) { 43@@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) {
44 int safe_glob(const char *path, int flags, glob_t *pglob) { 44 int safe_glob(const char *path, int flags, glob_t *pglob) {
45 int k; 45 int k;
46 46
@@ -48,7 +48,7 @@ index b335af8d97..2cdfc11f16 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@@ -34,9 +41,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { 51@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
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;
@@ -64,10 +64,10 @@ index b335af8d97..2cdfc11f16 100644
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 66diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
67index b4f41445fe..f0d474ed14 100644 67index 50b4924679..09c0a20aee 100644
68--- a/src/test/test-glob-util.c 68--- a/src/test/test-glob-util.c
69+++ b/src/test/test-glob-util.c 69+++ b/src/test/test-glob-util.c
70@@ -13,6 +13,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"
73 73
@@ -78,9 +78,9 @@ index b4f41445fe..f0d474ed14 100644
78+#endif 78+#endif
79+ 79+
80 static void test_glob_exists(void) { 80 static void test_glob_exists(void) {
81 char name[] = "/tmp/test-glob_exists.XXXXXX"; 81 log_info("/* %s */", __func__);
82 int fd = -1; 82
83@@ -40,11 +46,13 @@ static void test_glob_no_dot(void) { 83@@ -41,11 +47,13 @@ static void test_glob_no_dot(void) {
84 const char *fn; 84 const char *fn;
85 85
86 _cleanup_globfree_ glob_t g = { 86 _cleanup_globfree_ glob_t g = {
@@ -94,7 +94,7 @@ index b4f41445fe..f0d474ed14 100644
94 }; 94 };
95 95
96 int r; 96 int r;
97@@ -52,11 +60,19 @@ static void test_glob_no_dot(void) { 97@@ -55,11 +63,19 @@ static void test_glob_no_dot(void) {
98 assert_se(mkdtemp(template)); 98 assert_se(mkdtemp(template));
99 99
100 fn = strjoina(template, "/*"); 100 fn = strjoina(template, "/*");
@@ -115,10 +115,10 @@ index b4f41445fe..f0d474ed14 100644
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 117diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
118index 3c30612af1..14bc428085 100644 118index 7e85c50634..145c48a685 100644
119--- a/src/tmpfiles/tmpfiles.c 119--- a/src/tmpfiles/tmpfiles.c
120+++ b/src/tmpfiles/tmpfiles.c 120+++ b/src/tmpfiles/tmpfiles.c
121@@ -63,6 +63,12 @@ 121@@ -66,6 +66,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 3c30612af1..14bc428085 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@@ -1853,7 +1859,9 @@ finish: 134@@ -1990,7 +1996,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 3c30612af1..14bc428085 100644
141 }; 141 };
142 int r = 0, k; 142 int r = 0, k;
143 char **fn; 143 char **fn;
144@@ -1873,7 +1881,9 @@ static int glob_item(Item *i, action_t action) { 144@@ -2010,7 +2018,9 @@ static int glob_item(Item *i, action_t action) {
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-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0008-add-missing-FTW_-macros-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch
index d5f2349f2b..9540f967bb 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0008-add-missing-FTW_-macros-for-musl.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch
@@ -1,7 +1,7 @@
1From 6cd17c753d2c0a90fc791f69bbc694cbc8556a4f Mon Sep 17 00:00:00 2001 1From 45b78e3dc3edead4fc9883dd5a9877f473367bf7 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 15:00:06 +0800 3Date: Mon, 25 Feb 2019 15:00:06 +0800
4Subject: [PATCH 08/24] add missing FTW_ macros for musl 4Subject: [PATCH] add missing FTW_ macros for musl
5 5
6This is to avoid build failures like below for musl. 6This is to avoid build failures like below for musl.
7 7
@@ -12,10 +12,11 @@ Upstream-Status: Inappropriate [musl specific]
12Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 12Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
13--- 13---
14 src/basic/missing_type.h | 20 ++++++++++++++++++++ 14 src/basic/missing_type.h | 20 ++++++++++++++++++++
15 1 file changed, 20 insertions(+) 15 src/shared/mount-setup.c | 1 +
16 2 files changed, 21 insertions(+)
16 17
17diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h 18diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
18index c487e65..23602eb 100644 19index aeaf6ad5ec..3df1084ef2 100644
19--- a/src/basic/missing_type.h 20--- a/src/basic/missing_type.h
20+++ b/src/basic/missing_type.h 21+++ b/src/basic/missing_type.h
21@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *); 22@@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *);
@@ -42,6 +43,15 @@ index c487e65..23602eb 100644
42+#ifndef FTW_SKIP_SIBLINGS 43+#ifndef FTW_SKIP_SIBLINGS
43+#define FTW_SKIP_SIBLINGS 3 44+#define FTW_SKIP_SIBLINGS 3
44+#endif 45+#endif
45-- 46diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c
462.7.4 47index ef3527e9a7..c1cab40eb8 100644
47 48--- a/src/shared/mount-setup.c
49+++ b/src/shared/mount-setup.c
50@@ -32,6 +32,7 @@
51 #include "strv.h"
52 #include "user-util.h"
53 #include "virt.h"
54+#include "missing_type.h"
55
56 typedef enum MountMode {
57 MNT_NONE = 0,
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
index 8bacd0289d..35d24b334d 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch
@@ -1,20 +1,21 @@
1From f1f4b4f9684fed185bfa8b9ed409cdf241657e99 Mon Sep 17 00:00:00 2001 1From 943b4258b870c65caaa56fe4dad0d9c7281fdb1d 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 15:03:47 +0800 3Date: Mon, 25 Feb 2019 15:03:47 +0800
4Subject: [PATCH 10/24] fix missing of __register_atfork for non-glibc builds 4Subject: [PATCH] fix missing of __register_atfork for non-glibc builds
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9
9--- 10---
10 src/basic/process-util.c | 7 +++++++ 11 src/basic/process-util.c | 7 +++++++
11 1 file changed, 7 insertions(+) 12 1 file changed, 7 insertions(+)
12 13
13diff --git a/src/basic/process-util.c b/src/basic/process-util.c 14diff --git a/src/basic/process-util.c b/src/basic/process-util.c
14index 78ce43b..aec2daf 100644 15index 14259ea8df..18681838ef 100644
15--- a/src/basic/process-util.c 16--- a/src/basic/process-util.c
16+++ b/src/basic/process-util.c 17+++ b/src/basic/process-util.c
17@@ -22,6 +22,9 @@ 18@@ -18,6 +18,9 @@
18 #if HAVE_VALGRIND_VALGRIND_H 19 #if HAVE_VALGRIND_VALGRIND_H
19 #include <valgrind/valgrind.h> 20 #include <valgrind/valgrind.h>
20 #endif 21 #endif
@@ -24,7 +25,7 @@ index 78ce43b..aec2daf 100644
24 25
25 #include "alloc-util.h" 26 #include "alloc-util.h"
26 #include "architecture.h" 27 #include "architecture.h"
27@@ -1160,11 +1163,15 @@ void reset_cached_pid(void) { 28@@ -1202,11 +1205,15 @@ void reset_cached_pid(void) {
28 cached_pid = CACHED_PID_UNSET; 29 cached_pid = CACHED_PID_UNSET;
29 } 30 }
30 31
@@ -40,6 +41,3 @@ index 78ce43b..aec2daf 100644
40 41
41 pid_t getpid_cached(void) { 42 pid_t getpid_cached(void) {
42 static bool installed = false; 43 static bool installed = false;
43--
442.7.4
45
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0011-Use-uintmax_t-for-handling-rlim_t.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
index d6eda9c038..a0d8402288 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0011-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,7 +1,7 @@
1From e3f847bd0338d27aff3335b42661d8a4b66b965e Mon Sep 17 00:00:00 2001 1From cceb2bba69b371868e89d435c5406b67cdd84d57 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 15:12:41 +0800 3Date: Mon, 25 Feb 2019 15:12:41 +0800
4Subject: [PATCH 11/24] Use uintmax_t for handling rlim_t 4Subject: [PATCH] Use uintmax_t for handling rlim_t
5 5
6PRIu{32,64} is not right format to represent rlim_t type 6PRIu{32,64} is not right format to represent rlim_t type
7therefore use %ju and typecast the rlim_t variables to 7therefore use %ju and typecast the rlim_t variables to
@@ -20,17 +20,18 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199]
20Signed-off-by: Khem Raj <raj.khem@gmail.com> 20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21[Rebased for v241] 21[Rebased for v241]
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
23
23--- 24---
24 src/basic/format-util.h | 8 +------- 25 src/basic/format-util.h | 8 +-------
25 src/basic/rlimit-util.c | 10 +++++----- 26 src/basic/rlimit-util.c | 12 ++++++------
26 src/core/execute.c | 4 ++-- 27 src/core/execute.c | 4 ++--
27 3 files changed, 8 insertions(+), 14 deletions(-) 28 3 files changed, 9 insertions(+), 15 deletions(-)
28 29
29diff --git a/src/basic/format-util.h b/src/basic/format-util.h 30diff --git a/src/basic/format-util.h b/src/basic/format-util.h
30index dece5d3..dbb87bc 100644 31index b7e18768e3..3195ab205d 100644
31--- a/src/basic/format-util.h 32--- a/src/basic/format-util.h
32+++ b/src/basic/format-util.h 33+++ b/src/basic/format-util.h
33@@ -42,13 +42,7 @@ 34@@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
34 # define PRI_TIMEX "li" 35 # define PRI_TIMEX "li"
35 #endif 36 #endif
36 37
@@ -46,10 +47,19 @@ index dece5d3..dbb87bc 100644
46 #if SIZEOF_DEV_T == 8 47 #if SIZEOF_DEV_T == 8
47 # define DEV_FMT "%" PRIu64 48 # define DEV_FMT "%" PRIu64
48diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c 49diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
49index 74b3a02..b02c03c 100644 50index 23d108d5df..3e6fb438d7 100644
50--- a/src/basic/rlimit-util.c 51--- a/src/basic/rlimit-util.c
51+++ b/src/basic/rlimit-util.c 52+++ b/src/basic/rlimit-util.c
52@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { 53@@ -43,7 +43,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) {
54 fixed.rlim_max == highest.rlim_max)
55 return 0;
56
57- log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max);
58+ log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max);
59
60 if (setrlimit(resource, &fixed) < 0)
61 return -errno;
62@@ -308,13 +308,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) {
53 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) 63 if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY)
54 s = strdup("infinity"); 64 s = strdup("infinity");
55 else if (rl->rlim_cur >= RLIM_INFINITY) 65 else if (rl->rlim_cur >= RLIM_INFINITY)
@@ -67,7 +77,7 @@ index 74b3a02..b02c03c 100644
67 77
68 if (!s) 78 if (!s)
69 return -ENOMEM; 79 return -ENOMEM;
70@@ -404,7 +404,7 @@ int rlimit_nofile_safe(void) { 80@@ -405,7 +405,7 @@ int rlimit_nofile_safe(void) {
71 81
72 rl.rlim_cur = FD_SETSIZE; 82 rl.rlim_cur = FD_SETSIZE;
73 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) 83 if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
@@ -77,11 +87,11 @@ index 74b3a02..b02c03c 100644
77 return 1; 87 return 1;
78 } 88 }
79diff --git a/src/core/execute.c b/src/core/execute.c 89diff --git a/src/core/execute.c b/src/core/execute.c
80index a708231..e2b8748 100644 90index 2a64675c5f..dca1e0e3b6 100644
81--- a/src/core/execute.c 91--- a/src/core/execute.c
82+++ b/src/core/execute.c 92+++ b/src/core/execute.c
83@@ -4220,9 +4220,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { 93@@ -5391,9 +5391,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
84 for (i = 0; i < RLIM_NLIMITS; i++) 94 for (unsigned i = 0; i < RLIM_NLIMITS; i++)
85 if (c->rlimit[i]) { 95 if (c->rlimit[i]) {
86 fprintf(f, "%sLimit%s: " RLIM_FMT "\n", 96 fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
87- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max); 97- prefix, rlimit_to_string(i), c->rlimit[i]->rlim_max);
@@ -92,6 +102,3 @@ index a708231..e2b8748 100644
92 } 102 }
93 103
94 if (c->ioprio_set) { 104 if (c->ioprio_set) {
95--
962.7.4
97
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
index 914589dbd3..1aee0fd7c5 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch
@@ -1,22 +1,22 @@
1From d3d65d4036670cbd5129fe55c09ca391286ef4b3 Mon Sep 17 00:00:00 2001 1From c1ee5661fa24bf540a4880a9d528da8752be033b Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 28 Feb 2018 21:25:22 -0800 3Date: Wed, 28 Feb 2018 21:25:22 -0800
4Subject: [PATCH 14/24] test-sizeof.c: Disable tests for missing typedefs in 4Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl
5 musl
6 5
7Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
8 7
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 8Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 9Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
10
11--- 11---
12 src/test/test-sizeof.c | 4 ++++ 12 src/test/test-sizeof.c | 4 ++++
13 1 file changed, 4 insertions(+) 13 1 file changed, 4 insertions(+)
14 14
15diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c 15diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
16index 35b0876..e78e7ca 100644 16index e36bee4e8f..4403c0aa52 100644
17--- a/src/test/test-sizeof.c 17--- a/src/test/test-sizeof.c
18+++ b/src/test/test-sizeof.c 18+++ b/src/test/test-sizeof.c
19@@ -41,8 +41,10 @@ int main(void) { 19@@ -55,8 +55,10 @@ int main(void) {
20 info(unsigned); 20 info(unsigned);
21 info(long unsigned); 21 info(long unsigned);
22 info(long long unsigned); 22 info(long long unsigned);
@@ -27,7 +27,7 @@ index 35b0876..e78e7ca 100644
27 27
28 info(float); 28 info(float);
29 info(double); 29 info(double);
30@@ -60,7 +62,9 @@ int main(void) { 30@@ -74,7 +76,9 @@ int main(void) {
31 info(ssize_t); 31 info(ssize_t);
32 info(time_t); 32 info(time_t);
33 info(usec_t); 33 info(usec_t);
@@ -37,6 +37,3 @@ index 35b0876..e78e7ca 100644
37 info(pid_t); 37 info(pid_t);
38 info(uid_t); 38 info(uid_t);
39 info(gid_t); 39 info(gid_t);
40--
412.7.4
42
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
index fd407f604d..fefa6cbaaa 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
@@ -1,7 +1,7 @@
1From 48c628f532f6025c2d1646b6819cd81eb789d7fb Mon Sep 17 00:00:00 2001 1From ca9b1277fb4eb89bc2ca92440a280e318e882b66 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com> 2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 10 Oct 2017 14:33:30 -0700 3Date: Tue, 10 Oct 2017 14:33:30 -0700
4Subject: [PATCH 15/24] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() 4Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
5 5
6Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right 6Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
7thing to do and it's not portable (not supported by musl). See: 7thing to do and it's not portable (not supported by musl). See:
@@ -25,20 +25,22 @@ just historical and not actually necessary or desired behaviour?
25Upstream-Status: Inappropriate [musl specific] 25Upstream-Status: Inappropriate [musl specific]
26 26
27Signed-off-by: Andre McCurdy <armccurdy@gmail.com> 27Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
28
28--- 29---
29 src/basic/fs-util.h | 22 +++++++++++++++++++++- 30 src/basic/fs-util.h | 23 +++++++++++++++++++++--
30 src/shared/base-filesystem.c | 6 +++--- 31 src/shared/base-filesystem.c | 6 +++---
31 2 files changed, 24 insertions(+), 4 deletions(-) 32 2 files changed, 24 insertions(+), 5 deletions(-)
32 33
33diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h 34diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
34index 7ad030b..d4cb1e9 100644 35index 7f15b558ca..4263298cad 100644
35--- a/src/basic/fs-util.h 36--- a/src/basic/fs-util.h
36+++ b/src/basic/fs-util.h 37+++ b/src/basic/fs-util.h
37@@ -32,7 +32,27 @@ int fchmod_opath(int fd, mode_t m); 38@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct timespec ts[2]);
38
39 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);
40 41
41-#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) 42-#define laccess(path, mode) \
43- (faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) < 0 ? -errno : 0)
42+/* 44+/*
43+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to 45+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
44+ do and it's not portable (not supported by musl). See: 46+ do and it's not portable (not supported by musl). See:
@@ -64,13 +66,13 @@ index 7ad030b..d4cb1e9 100644
64 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); 66 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
65 int touch(const char *path); 67 int touch(const char *path);
66diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c 68diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
67index 89d7a7d..34b4ad5 100644 69index 016eb7b82a..b1967f9f2f 100644
68--- a/src/shared/base-filesystem.c 70--- a/src/shared/base-filesystem.c
69+++ b/src/shared/base-filesystem.c 71+++ b/src/shared/base-filesystem.c
70@@ -53,7 +53,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { 72@@ -53,7 +53,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
71 return log_error_errno(errno, "Failed to open root file system: %m"); 73 return log_error_errno(errno, "Failed to open root file system: %m");
72 74
73 for (i = 0; i < ELEMENTSOF(table); i ++) { 75 for (size_t i = 0; i < ELEMENTSOF(table); i++) {
74- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) 76- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
75+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) 77+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
76 continue; 78 continue;
@@ -94,6 +96,3 @@ index 89d7a7d..34b4ad5 100644
94 continue; 96 continue;
95 } 97 }
96 98
97--
982.7.4
99
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index d5565698aa..f9f3af1505 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -1,8 +1,7 @@
1From af76c973e41929360a6e021f2ff9a7fc1d7994e9 Mon Sep 17 00:00:00 2001 1From 792f4718ebd5a156729be89a5b47e52dc4b62975 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 27 May 2018 08:36:44 -0700 3Date: Sun, 27 May 2018 08:36:44 -0700
4Subject: [PATCH 16/24] Define glibc compatible basename() for non-glibc 4Subject: [PATCH] Define glibc compatible basename() for non-glibc systems
5 systems
6 5
7Fixes builds with musl, even though systemd is adamant about 6Fixes builds with musl, even though systemd is adamant about
8using non-posix basename implementation, we have a way out 7using non-posix basename implementation, we have a way out
@@ -10,25 +9,24 @@ using non-posix basename implementation, we have a way out
10Upstream-Status: Inappropriate [musl specific] 9Upstream-Status: Inappropriate [musl specific]
11 10
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13--- 13---
14 src/machine/machine-dbus.c | 4 ++++ 14 src/machine/machine-dbus.c | 5 +++++
15 1 file changed, 4 insertions(+) 15 1 file changed, 5 insertions(+)
16 16
17diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c 17diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
18index 7a558df..eca7d4b 100644 18index fc22e51409..1fed07b941 100644
19--- a/src/machine/machine-dbus.c 19--- a/src/machine/machine-dbus.c
20+++ b/src/machine/machine-dbus.c 20+++ b/src/machine/machine-dbus.c
21@@ -11,6 +11,10 @@ 21@@ -11,6 +11,11 @@
22 #include <libgen.h> 22 #include <libgen.h>
23 #undef basename 23 #undef basename
24 24
25+#if !defined(__GLIBC__) 25+#if !defined(__GLIBC__)
26+#include <string.h>
26+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) 27+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src)
27+#endif 28+#endif
28+ 29+
29 #include "alloc-util.h" 30 #include "alloc-util.h"
30 #include "bus-common-errors.h" 31 #include "bus-common-errors.h"
31 #include "bus-internal.h" 32 #include "bus-get-properties.h"
32--
332.7.4
34
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index 24e24e8e5a..fb901e6653 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -1,7 +1,7 @@
1From c7a4efb8bccb52e1714c151929c23e12bde59b82 Mon Sep 17 00:00:00 2001 1From 101f5ceea7e575622c4f07d2972aeb4d6b082e4b Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 4 Jul 2018 15:00:44 +0800 3Date: Wed, 4 Jul 2018 15:00:44 +0800
4Subject: [PATCH 17/24] Do not disable buffering when writing to oom_score_adj 4Subject: [PATCH] Do not disable buffering when writing to oom_score_adj
5 5
6On musl, disabling buffering when writing to oom_score_adj will 6On musl, disabling buffering when writing to oom_score_adj will
7cause the following error. 7cause the following error.
@@ -19,15 +19,16 @@ Upstream-Status: Inappropriate [musl specific]
19Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 19Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20[rebased for systemd 243] 20[rebased for systemd 243]
21Signed-off-by: Scott Murray <scott.murray@konsulko.com> 21Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22
22--- 23---
23 src/basic/process-util.c | 2 +- 24 src/basic/process-util.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-) 25 1 file changed, 1 insertion(+), 1 deletion(-)
25 26
26diff --git a/src/basic/process-util.c b/src/basic/process-util.c 27diff --git a/src/basic/process-util.c b/src/basic/process-util.c
27index b1c08fcade..0a7a1f7d89 100644 28index 18681838ef..0fa71ccce0 100644
28--- a/src/basic/process-util.c 29--- a/src/basic/process-util.c
29+++ b/src/basic/process-util.c 30+++ b/src/basic/process-util.c
30@@ -1474,7 +1474,7 @@ int set_oom_score_adjust(int value) { 31@@ -1606,7 +1606,7 @@ int set_oom_score_adjust(int value) {
31 sprintf(t, "%i", value); 32 sprintf(t, "%i", value);
32 33
33 return write_string_file("/proc/self/oom_score_adj", t, 34 return write_string_file("/proc/self/oom_score_adj", t,
@@ -35,4 +36,4 @@ index b1c08fcade..0a7a1f7d89 100644
35+ WRITE_STRING_FILE_VERIFY_ON_FAILURE); 36+ WRITE_STRING_FILE_VERIFY_ON_FAILURE);
36 } 37 }
37 38
38 static const char *const ioprio_class_table[] = { 39 int pidfd_get_pid(int fd, pid_t *ret) {
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index 5901772998..ece115df8e 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -1,7 +1,7 @@
1From fffb2810611b4a26f5c6c0958093b5b3b7d4cd99 Mon Sep 17 00:00:00 2001 1From 01ac079433b999a4747acf7be6a3b5fa182c3faf Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 10 Jul 2018 15:40:17 +0800 3Date: Tue, 10 Jul 2018 15:40:17 +0800
4Subject: [PATCH 18/24] distinguish XSI-compliant strerror_r from GNU-specifi 4Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi
5 strerror_r 5 strerror_r
6 6
7XSI-compliant strerror_r and GNU-specifi strerror_r are different. 7XSI-compliant strerror_r and GNU-specifi strerror_r are different.
@@ -18,33 +18,17 @@ assigned to (char *) variable, resulting in segment fault.
18Upstream-Status: Inappropriate [musl specific] 18Upstream-Status: Inappropriate [musl specific]
19 19
20Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 20Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
21
21--- 22---
22 src/journal/journal-send.c | 5 +++++ 23 src/libsystemd/sd-bus/bus-error.c | 5 +++++
23 src/libsystemd/sd-bus/bus-error.c | 5 +++++ 24 src/libsystemd/sd-journal/journal-send.c | 5 +++++
24 2 files changed, 10 insertions(+) 25 2 files changed, 10 insertions(+)
25 26
26diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
27index 3fea912..4f1e592 100644
28--- a/src/journal/journal-send.c
29+++ b/src/journal/journal-send.c
30@@ -337,7 +337,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
31 char* j;
32
33 errno = 0;
34+#ifndef __GLIBC__
35+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
36+ j = buffer + 8 + k;
37+#else
38 j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
39+#endif
40 if (errno == 0) {
41 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
42
43diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c 27diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
44index dc95237..bdda30f 100644 28index 7483b46a11..c49be29e46 100644
45--- a/src/libsystemd/sd-bus/bus-error.c 29--- a/src/libsystemd/sd-bus/bus-error.c
46+++ b/src/libsystemd/sd-bus/bus-error.c 30+++ b/src/libsystemd/sd-bus/bus-error.c
47@@ -379,7 +379,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { 31@@ -404,7 +404,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
48 return; 32 return;
49 33
50 errno = 0; 34 errno = 0;
@@ -57,6 +41,20 @@ index dc95237..bdda30f 100644
57 if (errno == ERANGE || strlen(x) >= k - 1) { 41 if (errno == ERANGE || strlen(x) >= k - 1) {
58 free(m); 42 free(m);
59 k *= 2; 43 k *= 2;
60-- 44diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
612.7.4 45index e8e6ad555b..8ca5271d02 100644
62 46--- a/src/libsystemd/sd-journal/journal-send.c
47+++ b/src/libsystemd/sd-journal/journal-send.c
48@@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove
49 char* j;
50
51 errno = 0;
52+#ifndef __GLIBC__
53+ strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
54+ j = buffer + 8 + k;
55+#else
56 j = strerror_r(_saved_errno_, buffer + 8 + k, n - 8 - k);
57+#endif
58 if (errno == 0) {
59 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
60
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
index 35cc66ff66..62a6c23e44 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
@@ -1,7 +1,7 @@
1From 969ab9e68249fd383f4b513b1c9306bdac4ae9b2 Mon Sep 17 00:00:00 2001 1From df2470912f3197aa441b6751feace1454c7d1f84 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 15:18:00 +0800 3Date: Mon, 25 Feb 2019 15:18:00 +0800
4Subject: [PATCH 19/24] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP 4Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP
5 5
6for currently unknown reasons they get exported to the shared libries 6for currently unknown reasons they get exported to the shared libries
7even without being listed in the sym file 7even without being listed in the sym file
@@ -11,15 +11,16 @@ Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12[Rebased for v241] 12[Rebased for v241]
13Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 13Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
14
14--- 15---
15 src/libsystemd/sd-bus/bus-error.c | 4 ++-- 16 src/libsystemd/sd-bus/bus-error.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-) 17 1 file changed, 2 insertions(+), 2 deletions(-)
17 18
18diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c 19diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
19index bdda30f..e21853c 100644 20index c49be29e46..90731bd7e7 100644
20--- a/src/libsystemd/sd-bus/bus-error.c 21--- a/src/libsystemd/sd-bus/bus-error.c
21+++ b/src/libsystemd/sd-bus/bus-error.c 22+++ b/src/libsystemd/sd-bus/bus-error.c
22@@ -54,8 +54,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { 23@@ -55,8 +55,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
23 }; 24 };
24 25
25 /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */ 26 /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
@@ -30,6 +31,3 @@ index bdda30f..e21853c 100644
30 31
31 /* Additional maps registered with sd_bus_error_add_map() are in this 32 /* Additional maps registered with sd_bus_error_add_map() are in this
32 * NULL terminated array */ 33 * NULL terminated array */
33--
342.7.4
35
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0020-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
index 753d5116ac..b6b1dc35b2 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0020-missing_type.h-add-__compar_d_fn_t-definition.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch
@@ -1,7 +1,7 @@
1From 75c06e3e2a4760b36fffd95cdf5535b8ad73c481 Mon Sep 17 00:00:00 2001 1From e27ecb188503159a3f11bb1179ba1892cd080843 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 15:27:54 +0800 3Date: Mon, 25 Feb 2019 15:27:54 +0800
4Subject: [PATCH 20/24] missing_type.h: add __compar_d_fn_t definition 4Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition
5 5
6Fix the following compile failure: 6Fix the following compile failure:
7src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'? 7src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'?
@@ -9,12 +9,13 @@ src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean
9Upstream-Status: Inappropriate [musl specific] 9Upstream-Status: Inappropriate [musl specific]
10 10
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12
12--- 13---
13 src/basic/missing_type.h | 1 + 14 src/basic/missing_type.h | 1 +
14 1 file changed, 1 insertion(+) 15 1 file changed, 1 insertion(+)
15 16
16diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h 17diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h
17index 7d7c1e4..85902ab 100644 18index 3df1084ef2..697aa7f58a 100644
18--- a/src/basic/missing_type.h 19--- a/src/basic/missing_type.h
19+++ b/src/basic/missing_type.h 20+++ b/src/basic/missing_type.h
20@@ -13,6 +13,7 @@ 21@@ -13,6 +13,7 @@
@@ -25,6 +26,3 @@ index 7d7c1e4..85902ab 100644
25 #endif 26 #endif
26 27
27 #ifndef __COMPAR_FN_T 28 #ifndef __COMPAR_FN_T
28--
292.7.4
30
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0021-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
index cdddf83890..fea347242a 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0021-avoid-redefinition-of-prctl_mm_map-structure.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch
@@ -1,7 +1,7 @@
1From 3fbf61d54b82fc9bf21d8039bfd89dc9efc5bbcd Mon Sep 17 00:00:00 2001 1From 748c4cf040856857f24f4aeef6d996bd58573bd3 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 15:44:54 +0800 3Date: Mon, 25 Feb 2019 15:44:54 +0800
4Subject: [PATCH 21/24] avoid redefinition of prctl_mm_map structure 4Subject: [PATCH] avoid redefinition of prctl_mm_map structure
5 5
6Fix the following compile failure: 6Fix the following compile failure:
7error: redefinition of 'struct prctl_mm_map' 7error: redefinition of 'struct prctl_mm_map'
@@ -9,16 +9,17 @@ error: redefinition of 'struct prctl_mm_map'
9Upstream-Status: Inappropriate [musl specific] 9Upstream-Status: Inappropriate [musl specific]
10 10
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12
12--- 13---
13 src/basic/missing_prctl.h | 2 ++ 14 src/basic/missing_prctl.h | 2 ++
14 1 file changed, 2 insertions(+) 15 1 file changed, 2 insertions(+)
15 16
16diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h 17diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h
17index f80cd17..47e4893 100644 18index ab851306ba..5547cad875 100644
18--- a/src/basic/missing_prctl.h 19--- a/src/basic/missing_prctl.h
19+++ b/src/basic/missing_prctl.h 20+++ b/src/basic/missing_prctl.h
20@@ -1,7 +1,9 @@ 21@@ -1,7 +1,9 @@
21 /* SPDX-License-Identifier: LGPL-2.1+ */ 22 /* SPDX-License-Identifier: LGPL-2.1-or-later */
22 #pragma once 23 #pragma once
23 24
24+#ifdef __GLIBC__ 25+#ifdef __GLIBC__
@@ -27,6 +28,3 @@ index f80cd17..47e4893 100644
27 28
28 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ 29 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */
29 #ifndef PR_CAP_AMBIENT 30 #ifndef PR_CAP_AMBIENT
30--
312.11.0
32
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch
new file mode 100644
index 0000000000..9a84d9c04a
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch
@@ -0,0 +1,24 @@
1From 647447e220e7e47e214c8258c7d4fbdb0da058aa 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---
10 src/partition/makefs.c | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/src/partition/makefs.c b/src/partition/makefs.c
14index 7c94fbfedb..42f966722d 100644
15--- a/src/partition/makefs.c
16+++ b/src/partition/makefs.c
17@@ -6,6 +6,7 @@
18 #include <sys/stat.h>
19 #include <sys/types.h>
20 #include <unistd.h>
21+#include <sys/file.h>
22
23 #include "alloc-util.h"
24 #include "blockdev-util.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
new file mode 100644
index 0000000000..5d3e8d4e84
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch
@@ -0,0 +1,38 @@
1From 85cf3d58ff1a9696f0754feffae7d81b8d1d9a43 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---
23 src/nspawn/nspawn.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
27index 575b9da447..ff08ed23cc 100644
28--- a/src/nspawn/nspawn.c
29+++ b/src/nspawn/nspawn.c
30@@ -5354,7 +5354,7 @@ static int cant_be_in_netns(void) {
31 if (fd < 0)
32 return log_error_errno(errno, "Failed to allocate udev control socket: %m");
33
34- if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
35+ if (connect(fd, (struct sockaddr *)&sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) {
36
37 if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno))
38 return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0024-test-json.c-define-M_PIl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch
index 0e5629d37b..c0286244dd 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0024-test-json.c-define-M_PIl.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch
@@ -1,7 +1,7 @@
1From 902412c271e0c5d9cb93b10ec0fb5b119b393474 Mon Sep 17 00:00:00 2001 1From 9770c5873836e702c2a58cf3b439198415c82c28 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 16:53:06 +0800 3Date: Mon, 25 Feb 2019 16:53:06 +0800
4Subject: [PATCH 24/24] test-json.c: define M_PIl 4Subject: [PATCH] test-json.c: define M_PIl
5 5
6Fix the following compile failure: 6Fix the following compile failure:
7src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? 7src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'?
@@ -9,15 +9,16 @@ src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this functi
9Upstream-Status: Inappropriate [musl specific] 9Upstream-Status: Inappropriate [musl specific]
10 10
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12
12--- 13---
13 src/test/test-json.c | 4 ++++ 14 src/test/test-json.c | 4 ++++
14 1 file changed, 4 insertions(+) 15 1 file changed, 4 insertions(+)
15 16
16diff --git a/src/test/test-json.c b/src/test/test-json.c 17diff --git a/src/test/test-json.c b/src/test/test-json.c
17index 9b8a2a9..efc746c 100644 18index 1d4b11945e..572c8cf9d0 100644
18--- a/src/test/test-json.c 19--- a/src/test/test-json.c
19+++ b/src/test/test-json.c 20+++ b/src/test/test-json.c
20@@ -11,6 +11,10 @@ 21@@ -13,6 +13,10 @@
21 #include "tests.h" 22 #include "tests.h"
22 #include "util.h" 23 #include "util.h"
23 24
@@ -28,6 +29,3 @@ index 9b8a2a9..efc746c 100644
28 static void test_tokenizer(const char *data, ...) { 29 static void test_tokenizer(const char *data, ...) {
29 unsigned line = 0, column = 0; 30 unsigned line = 0, column = 0;
30 void *state = NULL; 31 void *state = NULL;
31--
322.11.0
33
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-do-not-disable-buffer-in-writing-files.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch
index 2f4daf8665..9028e147bf 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0001-do-not-disable-buffer-in-writing-files.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch
@@ -1,4 +1,4 @@
1From 85e3c3046562ec24fc2f09ebfd08bf9f168091d5 Mon Sep 17 00:00:00 2001 1From 26da484391e20b36eb65c98872d1145261028c7a Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 1 Mar 2019 15:22:15 +0800 3Date: Fri, 1 Mar 2019 15:22:15 +0800
4Subject: [PATCH] do not disable buffer in writing files 4Subject: [PATCH] do not disable buffer in writing files
@@ -18,40 +18,31 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18Signed-off-by: Andrej Valek <andrej.valek@siemens.com> 18Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
19[rebased for systemd 243] 19[rebased for systemd 243]
20Signed-off-by: Scott Murray <scott.murray@konsulko.com> 20Signed-off-by: Scott Murray <scott.murray@konsulko.com>
21
21--- 22---
22 src/basic/cgroup-util.c | 14 +++++++------- 23 src/basic/cgroup-util.c | 10 +++++-----
23 src/basic/procfs-util.c | 4 ++-- 24 src/basic/procfs-util.c | 4 ++--
24 src/basic/smack-util.c | 2 +- 25 src/basic/sysctl-util.c | 2 +-
25 src/basic/util.c | 2 +- 26 src/basic/util.c | 2 +-
26 src/binfmt/binfmt.c | 6 +++--- 27 src/binfmt/binfmt.c | 6 +++---
27 src/core/main.c | 4 ++-- 28 src/core/main.c | 4 ++--
28 src/core/smack-setup.c | 8 ++++---- 29 src/core/smack-setup.c | 8 ++++----
29 src/hibernate-resume/hibernate-resume.c | 2 +- 30 src/hibernate-resume/hibernate-resume.c | 2 +-
30 src/libsystemd/sd-device/sd-device.c | 2 +- 31 src/libsystemd/sd-device/sd-device.c | 2 +-
31 src/login/logind-dbus.c | 2 +-
32 src/nspawn/nspawn-cgroup.c | 2 +- 32 src/nspawn/nspawn-cgroup.c | 2 +-
33 src/nspawn/nspawn.c | 6 +++--- 33 src/nspawn/nspawn.c | 6 +++---
34 src/shared/sysctl-util.c | 2 +- 34 src/shared/cgroup-setup.c | 4 ++--
35 src/sleep/sleep.c | 10 +++++----- 35 src/shared/mount-util.c | 4 ++--
36 src/udev/udevadm-trigger.c | 2 +- 36 src/shared/smack-util.c | 2 +-
37 src/udev/udevd.c | 2 +- 37 src/sleep/sleep.c | 8 ++++----
38 src/vconsole/vconsole-setup.c | 2 +- 38 src/vconsole/vconsole-setup.c | 2 +-
39 17 files changed, 36 insertions(+), 36 deletions(-) 39 16 files changed, 34 insertions(+), 34 deletions(-)
40 40
41diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c 41diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
42index 7b5839ccd6..18f6e8ffc8 100644 42index c9efd862a2..b3708ea925 100644
43--- a/src/basic/cgroup-util.c 43--- a/src/basic/cgroup-util.c
44+++ b/src/basic/cgroup-util.c 44+++ b/src/basic/cgroup-util.c
45@@ -860,7 +860,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { 45@@ -766,7 +766,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
46
47 xsprintf(c, PID_FMT "\n", pid);
48
49- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
50+ r = write_string_file(fs, c, 0);
51 if (r < 0)
52 return r;
53
54@@ -1142,7 +1142,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
55 46
56 sc = strstrip(contents); 47 sc = strstrip(contents);
57 if (isempty(sc)) { 48 if (isempty(sc)) {
@@ -60,7 +51,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
60 if (r < 0) 51 if (r < 0)
61 return r; 52 return r;
62 } else if (!path_equal(sc, agent)) 53 } else if (!path_equal(sc, agent))
63@@ -1160,7 +1160,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 54@@ -784,7 +784,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
64 55
65 sc = strstrip(contents); 56 sc = strstrip(contents);
66 if (streq(sc, "0")) { 57 if (streq(sc, "0")) {
@@ -69,7 +60,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
69 if (r < 0) 60 if (r < 0)
70 return r; 61 return r;
71 62
72@@ -1187,7 +1187,7 @@ int cg_uninstall_release_agent(const char *controller) { 63@@ -811,7 +811,7 @@ int cg_uninstall_release_agent(const char *controller) {
73 if (r < 0) 64 if (r < 0)
74 return r; 65 return r;
75 66
@@ -78,7 +69,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
78 if (r < 0) 69 if (r < 0)
79 return r; 70 return r;
80 71
81@@ -1197,7 +1197,7 @@ int cg_uninstall_release_agent(const char *controller) { 72@@ -821,7 +821,7 @@ int cg_uninstall_release_agent(const char *controller) {
82 if (r < 0) 73 if (r < 0)
83 return r; 74 return r;
84 75
@@ -87,7 +78,7 @@ index 7b5839ccd6..18f6e8ffc8 100644
87 if (r < 0) 78 if (r < 0)
88 return r; 79 return r;
89 80
90@@ -2053,7 +2053,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri 81@@ -1651,7 +1651,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
91 if (r < 0) 82 if (r < 0)
92 return r; 83 return r;
93 84
@@ -96,17 +87,8 @@ index 7b5839ccd6..18f6e8ffc8 100644
96 } 87 }
97 88
98 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { 89 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
99@@ -2697,7 +2697,7 @@ int cg_enable_everywhere(
100 return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
101 }
102
103- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
104+ r = write_string_stream(f, s, 0);
105 if (r < 0) {
106 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
107 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
108diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c 90diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
109index 42ce53d5aa..57512532a6 100644 91index 8c57094225..0cf6ec752b 100644
110--- a/src/basic/procfs-util.c 92--- a/src/basic/procfs-util.c
111+++ b/src/basic/procfs-util.c 93+++ b/src/basic/procfs-util.c
112@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { 94@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) {
@@ -125,24 +107,24 @@ index 42ce53d5aa..57512532a6 100644
125 if (r < 0) { 107 if (r < 0) {
126 uint64_t threads_max; 108 uint64_t threads_max;
127 109
128diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c 110diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
129index 123d00e13e..e7ea78f349 100644 111index 8913e6ff85..29e6ec0755 100644
130--- a/src/basic/smack-util.c 112--- a/src/basic/sysctl-util.c
131+++ b/src/basic/smack-util.c 113+++ b/src/basic/sysctl-util.c
132@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { 114@@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c
133 return 0;
134 115
135 p = procfs_file_alloca(pid, "attr/current"); 116 log_debug("Setting '%s' to '%s'", p, value);
136- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); 117
137+ r = write_string_file(p, label, 0); 118- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER);
138 if (r < 0) 119+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0);
139 return r; 120 }
140 121
122 int sysctl_read(const char *property, char **ret) {
141diff --git a/src/basic/util.c b/src/basic/util.c 123diff --git a/src/basic/util.c b/src/basic/util.c
142index 93d610bc98..97dca64f73 100644 124index 955b18bd2a..6d89c90176 100644
143--- a/src/basic/util.c 125--- a/src/basic/util.c
144+++ b/src/basic/util.c 126+++ b/src/basic/util.c
145@@ -294,7 +294,7 @@ void disable_coredumps(void) { 127@@ -234,7 +234,7 @@ void disable_coredumps(void) {
146 if (detect_container() > 0) 128 if (detect_container() > 0)
147 return; 129 return;
148 130
@@ -152,7 +134,7 @@ index 93d610bc98..97dca64f73 100644
152 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 134 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
153 } 135 }
154diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c 136diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
155index aa9d811f2e..8c7f2dae7a 100644 137index 29530bb691..3ecf6a45a2 100644
156--- a/src/binfmt/binfmt.c 138--- a/src/binfmt/binfmt.c
157+++ b/src/binfmt/binfmt.c 139+++ b/src/binfmt/binfmt.c
158@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { 140@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) {
@@ -173,7 +155,7 @@ index aa9d811f2e..8c7f2dae7a 100644
173 if (r < 0) 155 if (r < 0)
174 return log_error_errno(r, "Failed to add binary format: %m"); 156 return log_error_errno(r, "Failed to add binary format: %m");
175 157
176@@ -213,7 +213,7 @@ static int run(int argc, char *argv[]) { 158@@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) {
177 } 159 }
178 160
179 /* Flush out all rules */ 161 /* Flush out all rules */
@@ -183,10 +165,10 @@ index aa9d811f2e..8c7f2dae7a 100644
183 STRV_FOREACH(f, files) { 165 STRV_FOREACH(f, files) {
184 k = apply_file(*f, true); 166 k = apply_file(*f, true);
185diff --git a/src/core/main.c b/src/core/main.c 167diff --git a/src/core/main.c b/src/core/main.c
186index bcce7178a8..4199cedab9 100644 168index c64c73883e..1ac185e946 100644
187--- a/src/core/main.c 169--- a/src/core/main.c
188+++ b/src/core/main.c 170+++ b/src/core/main.c
189@@ -1285,7 +1285,7 @@ static int bump_unix_max_dgram_qlen(void) { 171@@ -1402,7 +1402,7 @@ static int bump_unix_max_dgram_qlen(void) {
190 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) 172 if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN)
191 return 0; 173 return 0;
192 174
@@ -195,7 +177,7 @@ index bcce7178a8..4199cedab9 100644
195 if (r < 0) 177 if (r < 0)
196 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, 178 return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r,
197 "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); 179 "Failed to bump AF_UNIX datagram queue length, ignoring: %m");
198@@ -1509,7 +1509,7 @@ static void initialize_core_pattern(bool skip_setup) { 180@@ -1679,7 +1679,7 @@ static void initialize_core_pattern(bool skip_setup) {
199 if (getpid_cached() != 1) 181 if (getpid_cached() != 1)
200 return; 182 return;
201 183
@@ -205,10 +187,10 @@ index bcce7178a8..4199cedab9 100644
205 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); 187 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern);
206 } 188 }
207diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c 189diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
208index b95e6239d4..fdbdaaaccb 100644 190index 79c4808473..b111ce0a11 100644
209--- a/src/core/smack-setup.c 191--- a/src/core/smack-setup.c
210+++ b/src/core/smack-setup.c 192+++ b/src/core/smack-setup.c
211@@ -325,17 +325,17 @@ int mac_smack_setup(bool *loaded_policy) { 193@@ -323,17 +323,17 @@ int mac_smack_setup(bool *loaded_policy) {
212 } 194 }
213 195
214 #ifdef SMACK_RUN_LABEL 196 #ifdef SMACK_RUN_LABEL
@@ -231,7 +213,7 @@ index b95e6239d4..fdbdaaaccb 100644
231 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 213 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
232 #endif 214 #endif
233diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c 215diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c
234index 17e7cd1a00..87a7667716 100644 216index 58e35e403e..1d0beb4008 100644
235--- a/src/hibernate-resume/hibernate-resume.c 217--- a/src/hibernate-resume/hibernate-resume.c
236+++ b/src/hibernate-resume/hibernate-resume.c 218+++ b/src/hibernate-resume/hibernate-resume.c
237@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { 219@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
@@ -244,36 +226,23 @@ index 17e7cd1a00..87a7667716 100644
244 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); 226 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor);
245 return EXIT_FAILURE; 227 return EXIT_FAILURE;
246diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c 228diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
247index c4a7f2f3d3..bcac758284 100644 229index 388128bf33..695f535ff4 100644
248--- a/src/libsystemd/sd-device/sd-device.c 230--- a/src/libsystemd/sd-device/sd-device.c
249+++ b/src/libsystemd/sd-device/sd-device.c 231+++ b/src/libsystemd/sd-device/sd-device.c
250@@ -1849,7 +1849,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, 232@@ -2096,7 +2096,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
251 if (!value) 233 if (!value)
252 return -ENOMEM; 234 return -ENOMEM;
253 235
254- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW); 236- r = write_string_file(path, value, WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_NOFOLLOW);
255+ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW); 237+ r = write_string_file(path, value, 0 | WRITE_STRING_FILE_NOFOLLOW);
256 if (r < 0) { 238 if (r < 0) {
257 if (r == -ELOOP) 239 /* On failure, clear cache entry, as we do not know how it fails. */
258 return -EINVAL; 240 device_remove_cached_sysattr_value(device, sysattr);
259diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
260index 30b9a66334..cc1d577933 100644
261--- a/src/login/logind-dbus.c
262+++ b/src/login/logind-dbus.c
263@@ -1325,7 +1325,7 @@ static int trigger_device(Manager *m, sd_device *d) {
264 if (!t)
265 return -ENOMEM;
266
267- (void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
268+ (void) write_string_file(t, "change", 0);
269 }
270
271 return 0;
272diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c 241diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
273index 0462b46413..7c53d41483 100644 242index cb01b25bc6..e92051268b 100644
274--- a/src/nspawn/nspawn-cgroup.c 243--- a/src/nspawn/nspawn-cgroup.c
275+++ b/src/nspawn/nspawn-cgroup.c 244+++ b/src/nspawn/nspawn-cgroup.c
276@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { 245@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
277 fn = strjoina(tree, cgroup, "/cgroup.procs"); 246 fn = strjoina(tree, cgroup, "/cgroup.procs");
278 247
279 sprintf(pid_string, PID_FMT, pid); 248 sprintf(pid_string, PID_FMT, pid);
@@ -283,10 +252,10 @@ index 0462b46413..7c53d41483 100644
283 log_error_errno(r, "Failed to move process: %m"); 252 log_error_errno(r, "Failed to move process: %m");
284 goto finish; 253 goto finish;
285diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 254diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
286index 2aec8041f0..841542f2f3 100644 255index ff08ed23cc..e7c4a874a9 100644
287--- a/src/nspawn/nspawn.c 256--- a/src/nspawn/nspawn.c
288+++ b/src/nspawn/nspawn.c 257+++ b/src/nspawn/nspawn.c
289@@ -2357,7 +2357,7 @@ static int reset_audit_loginuid(void) { 258@@ -2751,7 +2751,7 @@ static int reset_audit_loginuid(void) {
290 if (streq(p, "4294967295")) 259 if (streq(p, "4294967295"))
291 return 0; 260 return 0;
292 261
@@ -295,10 +264,54 @@ index 2aec8041f0..841542f2f3 100644
295 if (r < 0) { 264 if (r < 0) {
296 log_error_errno(r, 265 log_error_errno(r,
297 "Failed to reset audit login UID. This probably means that your kernel is too\n" 266 "Failed to reset audit login UID. This probably means that your kernel is too\n"
298@@ -3566,13 +3566,13 @@ static int setup_uid_map(pid_t pid) { 267@@ -4148,7 +4148,7 @@ static int setup_uid_map(
268 return log_oom();
269
270 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
271- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
272+ r = write_string_file(uid_map, s, 0);
273 if (r < 0)
274 return log_error_errno(r, "Failed to write UID map: %m");
275
276@@ -4158,7 +4158,7 @@ static int setup_uid_map(
277 return log_oom();
278
279 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
280- r = write_string_file(uid_map, s, WRITE_STRING_FILE_DISABLE_BUFFER);
281+ r = write_string_file(uid_map, s, 0);
282 if (r < 0)
283 return log_error_errno(r, "Failed to write GID map: %m");
284
285diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
286index f197f715c7..077f893177 100644
287--- a/src/shared/cgroup-setup.c
288+++ b/src/shared/cgroup-setup.c
289@@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
290
291 xsprintf(c, PID_FMT "\n", pid);
292
293- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
294+ r = write_string_file(fs, c, 0);
295 if (r < 0)
296 return r;
297
298@@ -799,7 +799,7 @@ int cg_enable_everywhere(
299 return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
300 }
301
302- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
303+ r = write_string_stream(f, s, 0);
304 if (r < 0) {
305 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
306 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
307diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c
308index 594efea989..d243b45bc4 100644
309--- a/src/shared/mount-util.c
310+++ b/src/shared/mount-util.c
311@@ -1019,13 +1019,13 @@ static int make_userns(uid_t uid_shift, uid_t uid_range) {
312 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, uid_shift, uid_range);
299 313
300 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 314 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
301 xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range);
302- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); 315- r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER);
303+ r = write_string_file(uid_map, line, 0); 316+ r = write_string_file(uid_map, line, 0);
304 if (r < 0) 317 if (r < 0)
@@ -311,50 +324,42 @@ index 2aec8041f0..841542f2f3 100644
311 if (r < 0) 324 if (r < 0)
312 return log_error_errno(r, "Failed to write GID map: %m"); 325 return log_error_errno(r, "Failed to write GID map: %m");
313 326
314diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c 327diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c
315index 93bdcf11bf..68cddb7a9f 100644 328index 3362ee3924..80c0f2a52e 100644
316--- a/src/shared/sysctl-util.c 329--- a/src/shared/smack-util.c
317+++ b/src/shared/sysctl-util.c 330+++ b/src/shared/smack-util.c
318@@ -88,7 +88,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c 331@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
319 332 return 0;
320 log_debug("Setting '%s' to '%s'", p, value);
321 333
322- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); 334 p = procfs_file_alloca(pid, "attr/current");
323+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); 335- r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER);
324 } 336+ r = write_string_file(p, label, 0);
337 if (r < 0)
338 return r;
325 339
326 int sysctl_read(const char *property, char **content) {
327diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c 340diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
328index b9fe96635d..f168d7f890 100644 341index a3aeb24633..d3e68e1b94 100644
329--- a/src/sleep/sleep.c 342--- a/src/sleep/sleep.c
330+++ b/src/sleep/sleep.c 343+++ b/src/sleep/sleep.c
331@@ -54,7 +54,7 @@ static int write_hibernate_location_info(void) { 344@@ -46,7 +46,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
345 assert(hibernate_location->swap);
332 346
333 /* if it's a swap partition, we just write the disk to /sys/power/resume */ 347 xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno));
334 if (streq(type, "partition")) { 348- r = write_string_file("/sys/power/resume", resume_str, WRITE_STRING_FILE_DISABLE_BUFFER);
335- r = write_string_file("/sys/power/resume", device, WRITE_STRING_FILE_DISABLE_BUFFER); 349+ r = write_string_file("/sys/power/resume", resume_str, 0);
336+ r = write_string_file("/sys/power/resume", device, 0); 350 if (r < 0)
337 if (r < 0) 351 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m",
338 return log_debug_errno(r, "Failed to write partition device to /sys/power/resume: %m"); 352 hibernate_location->swap->device, resume_str);
339 353@@ -73,7 +73,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca
340@@ -98,14 +98,14 @@ static int write_hibernate_location_info(void) { 354 }
341 355
342 offset = fiemap->fm_extents[0].fe_physical / page_size(); 356 xsprintf(offset_str, "%" PRIu64, hibernate_location->offset);
343 xsprintf(offset_str, "%" PRIu64, offset);
344- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); 357- r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER);
345+ r = write_string_file("/sys/power/resume_offset", offset_str, 0); 358+ r = write_string_file("/sys/power/resume_offset", offset_str, 0);
346 if (r < 0) 359 if (r < 0)
347 return log_debug_errno(r, "Failed to write offset '%s': %m", offset_str); 360 return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m",
348 361 hibernate_location->swap->device, offset_str);
349 log_debug("Wrote calculated resume_offset value to /sys/power/resume_offset: %s", offset_str); 362@@ -90,7 +90,7 @@ static int write_mode(char **modes) {
350
351 xsprintf(device_str, "%lx", (unsigned long)stb.st_dev);
352- r = write_string_file("/sys/power/resume", device_str, WRITE_STRING_FILE_DISABLE_BUFFER);
353+ r = write_string_file("/sys/power/resume", device_str, 0);
354 if (r < 0)
355 return log_debug_errno(r, "Failed to write device '%s': %m", device_str);
356
357@@ -121,7 +121,7 @@ static int write_mode(char **modes) {
358 STRV_FOREACH(mode, modes) { 363 STRV_FOREACH(mode, modes) {
359 int k; 364 int k;
360 365
@@ -363,7 +368,7 @@ index b9fe96635d..f168d7f890 100644
363 if (k >= 0) 368 if (k >= 0)
364 return 0; 369 return 0;
365 370
366@@ -140,7 +140,7 @@ static int write_state(FILE **f, char **states) { 371@@ -112,7 +112,7 @@ static int write_state(FILE **f, char **states) {
367 STRV_FOREACH(state, states) { 372 STRV_FOREACH(state, states) {
368 int k; 373 int k;
369 374
@@ -372,37 +377,11 @@ index b9fe96635d..f168d7f890 100644
372 if (k >= 0) 377 if (k >= 0)
373 return 0; 378 return 0;
374 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); 379 log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state);
375diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
376index 77d95e513f..25ce4abfb1 100644
377--- a/src/udev/udevadm-trigger.c
378+++ b/src/udev/udevadm-trigger.c
379@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se
380 if (!filename)
381 return log_oom();
382
383- r = write_string_file(filename, action, WRITE_STRING_FILE_DISABLE_BUFFER);
384+ r = write_string_file(filename, action, 0);
385 if (r < 0) {
386 log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_ERR, r,
387 "Failed to write '%s' to '%s': %m", action, filename);
388diff --git a/src/udev/udevd.c b/src/udev/udevd.c
389index cb5123042a..ea309a9e7f 100644
390--- a/src/udev/udevd.c
391+++ b/src/udev/udevd.c
392@@ -1113,7 +1113,7 @@ static int synthesize_change_one(sd_device *dev, const char *syspath) {
393
394 filename = strjoina(syspath, "/uevent");
395 log_device_debug(dev, "device is closed, synthesising 'change' on %s", syspath);
396- r = write_string_file(filename, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
397+ r = write_string_file(filename, "change", 0);
398 if (r < 0)
399 return log_device_debug_errno(dev, r, "Failed to write 'change' to %s: %m", filename);
400 return 0;
401diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c 380diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
402index 75d052ae70..5a15c939d8 100644 381index d1c3febdd5..1cc68694d1 100644
403--- a/src/vconsole/vconsole-setup.c 382--- a/src/vconsole/vconsole-setup.c
404+++ b/src/vconsole/vconsole-setup.c 383+++ b/src/vconsole/vconsole-setup.c
405@@ -117,7 +117,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { 384@@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
406 static int toggle_utf8_sysfs(bool utf8) { 385 static int toggle_utf8_sysfs(bool utf8) {
407 int r; 386 int r;
408 387
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch
index 0f75e8c12d..152a36229c 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd-243/0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch
@@ -1,4 +1,7 @@
1Handle __cpu_mask usage 1From 5fa412dcebe89fd9f6f6003163f17e0dc719df34 Mon Sep 17 00:00:00 2001
2From: Scott Murray <scott.murray@konsulko.com>
3Date: Fri, 13 Sep 2019 19:26:27 -0400
4Subject: [PATCH] Handle __cpu_mask usage
2 5
3Fixes errors: 6Fixes errors:
4 7
@@ -15,13 +18,14 @@ add a typedef to cpu-set-util.h defining __cpu_mask appropriately.
15Upstream-Status: Inappropriate [musl specific] 18Upstream-Status: Inappropriate [musl specific]
16 19
17Signed-off-by: Scott Murray <scott.murray@konsulko.com> 20Signed-off-by: Scott Murray <scott.murray@konsulko.com>
21
18--- 22---
19 src/shared/cpu-set-util.h | 2 ++ 23 src/shared/cpu-set-util.h | 2 ++
20 src/test/test-sizeof.c | 2 +- 24 src/test/test-sizeof.c | 2 +-
21 2 files changed, 3 insertions(+), 1 deletion(-) 25 2 files changed, 3 insertions(+), 1 deletion(-)
22 26
23diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h 27diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h
24index 27812dfd59..f698f9df83 100644 28index 3c63a58826..4c2d4347fc 100644
25--- a/src/shared/cpu-set-util.h 29--- a/src/shared/cpu-set-util.h
26+++ b/src/shared/cpu-set-util.h 30+++ b/src/shared/cpu-set-util.h
27@@ -6,6 +6,8 @@ 31@@ -6,6 +6,8 @@
@@ -34,17 +38,17 @@ index 27812dfd59..f698f9df83 100644
34 typedef struct CPUSet { 38 typedef struct CPUSet {
35 cpu_set_t *set; 39 cpu_set_t *set;
36diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c 40diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
37index a710db5370..d1601ad929 100644 41index 4403c0aa52..e7e4ae112d 100644
38--- a/src/test/test-sizeof.c 42--- a/src/test/test-sizeof.c
39+++ b/src/test/test-sizeof.c 43+++ b/src/test/test-sizeof.c
40@@ -1,6 +1,5 @@ 44@@ -1,6 +1,5 @@
41 /* SPDX-License-Identifier: LGPL-2.1+ */ 45 /* SPDX-License-Identifier: LGPL-2.1-or-later */
42 46
43-#include <sched.h> 47-#include <sched.h>
44 #include <stdio.h> 48 #include <stdio.h>
45 #include <string.h> 49 #include <string.h>
46 50 #include <sys/types.h>
47@@ -8,6 +7,7 @@ 51@@ -10,6 +9,7 @@
48 #include <float.h> 52 #include <float.h>
49 53
50 #include "time-util.h" 54 #include "time-util.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch
new file mode 100644
index 0000000000..95df83c94b
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch
@@ -0,0 +1,171 @@
1From 4835f3ca2e277abd93e2d4a74ecfd7401f32862b Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Tue, 10 Mar 2020 11:05:20 +0000
4Subject: [PATCH] Handle missing gshadow
5
6gshadow usage is now present in the userdb code. Mask all uses of it to
7allow compilation on musl
8
9Upstream-Status: Inappropriate [musl specific]
10Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
11[Rebased for v247]
12Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
13
14---
15 src/shared/user-record-nss.c | 20 ++++++++++++++++++++
16 src/shared/user-record-nss.h | 4 ++++
17 src/shared/userdb.c | 7 ++++++-
18 3 files changed, 30 insertions(+), 1 deletion(-)
19
20diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
21index 88b8fc2f8f..a819d41bac 100644
22--- a/src/shared/user-record-nss.c
23+++ b/src/shared/user-record-nss.c
24@@ -331,8 +331,10 @@ int nss_group_to_group_record(
25 if (isempty(grp->gr_name))
26 return -EINVAL;
27
28+#if ENABLE_GSHADOW
29 if (sgrp && !streq_ptr(sgrp->sg_namp, grp->gr_name))
30 return -EINVAL;
31+#endif
32
33 g = group_record_new();
34 if (!g)
35@@ -348,6 +350,7 @@ int nss_group_to_group_record(
36
37 g->gid = grp->gr_gid;
38
39+#if ENABLE_GSHADOW
40 if (sgrp) {
41 if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) {
42 g->hashed_password = strv_new(sgrp->sg_passwd);
43@@ -363,6 +366,7 @@ int nss_group_to_group_record(
44 if (r < 0)
45 return r;
46 }
47+#endif
48
49 r = json_build(&g->json, JSON_BUILD_OBJECT(
50 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
51@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
52 assert(ret_sgrp);
53 assert(ret_buffer);
54
55+#if ENABLE_GSHADOW
56 for (;;) {
57 _cleanup_free_ char *buf = NULL;
58 struct sgrp sgrp, *result;
59@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
60 buflen *= 2;
61 buf = mfree(buf);
62 }
63+#else
64+ return -ESRCH;
65+#endif
66 }
67
68 int nss_group_record_by_name(
69@@ -427,7 +435,9 @@ int nss_group_record_by_name(
70 struct group grp, *result;
71 bool incomplete = false;
72 size_t buflen = 4096;
73+#if ENABLE_GSHADOW
74 struct sgrp sgrp, *sresult = NULL;
75+#endif
76 int r;
77
78 assert(name);
79@@ -457,6 +467,7 @@ int nss_group_record_by_name(
80 buf = mfree(buf);
81 }
82
83+#if ENABLE_GSHADOW
84 if (with_shadow) {
85 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
86 if (r < 0) {
87@@ -468,6 +479,9 @@ int nss_group_record_by_name(
88 incomplete = true;
89
90 r = nss_group_to_group_record(result, sresult, ret);
91+#else
92+ r = nss_group_to_group_record(result, NULL, ret);
93+#endif
94 if (r < 0)
95 return r;
96
97@@ -484,7 +498,9 @@ int nss_group_record_by_gid(
98 struct group grp, *result;
99 bool incomplete = false;
100 size_t buflen = 4096;
101+#if ENABLE_GSHADOW
102 struct sgrp sgrp, *sresult = NULL;
103+#endif
104 int r;
105
106 assert(ret);
107@@ -512,6 +528,7 @@ int nss_group_record_by_gid(
108 buf = mfree(buf);
109 }
110
111+#if ENABLE_GSHADOW
112 if (with_shadow) {
113 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
114 if (r < 0) {
115@@ -523,6 +540,9 @@ int nss_group_record_by_gid(
116 incomplete = true;
117
118 r = nss_group_to_group_record(result, sresult, ret);
119+#else
120+ r = nss_group_to_group_record(result, NULL, ret);
121+#endif
122 if (r < 0)
123 return r;
124
125diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h
126index 22ab04d6ee..4e52e7a911 100644
127--- a/src/shared/user-record-nss.h
128+++ b/src/shared/user-record-nss.h
129@@ -2,7 +2,11 @@
130 #pragma once
131
132 #include <grp.h>
133+#if ENABLE_GSHADOW
134 #include <gshadow.h>
135+#else
136+struct sgrp;
137+#endif
138 #include <pwd.h>
139 #include <shadow.h>
140
141diff --git a/src/shared/userdb.c b/src/shared/userdb.c
142index 91ac7c3832..20881ece84 100644
143--- a/src/shared/userdb.c
144+++ b/src/shared/userdb.c
145@@ -1047,13 +1047,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
146 if (gr) {
147 _cleanup_free_ char *buffer = NULL;
148 bool incomplete = false;
149+#if ENABLE_GSHADOW
150 struct sgrp sgrp;
151-
152+#endif
153 if (streq_ptr(gr->gr_name, "root"))
154 iterator->synthesize_root = false;
155 if (gr->gr_gid == GID_NOBODY)
156 iterator->synthesize_nobody = false;
157
158+#if ENABLE_GSHADOW
159 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
160 r = nss_sgrp_for_group(gr, &sgrp, &buffer);
161 if (r < 0) {
162@@ -1066,6 +1068,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
163 }
164
165 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
166+#else
167+ r = nss_group_to_group_record(gr, NULL, ret);
168+#endif
169 if (r < 0)
170 return r;
171
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
new file mode 100644
index 0000000000..167f724add
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
@@ -0,0 +1,34 @@
1From e90f18da3d2aef07ddd7d312ca8b34ff0324208e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 12 Apr 2021 23:44:53 -0700
4Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl
5
6musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64
7unlike glibc where these are provided by libc headers, therefore define
8them here in case they are undefined
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14---
15 src/basic/missing_syscall.h | 6 ++++++
16 1 file changed, 6 insertions(+)
17
18diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
19index 9e3a165857..4d59b3e7b0 100644
20--- a/src/basic/missing_syscall.h
21+++ b/src/basic/missing_syscall.h
22@@ -20,6 +20,12 @@
23 #include <asm/sgidefs.h>
24 #endif
25
26+#ifndef _MIPS_SIM_ABI32
27+#define _MIPS_SIM_ABI32 1
28+#define _MIPS_SIM_NABI32 2
29+#define _MIPS_SIM_ABI64 3
30+#endif
31+
32 #include "missing_keyctl.h"
33 #include "missing_stat.h"
34 #include "missing_syscall_def.h"
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/static-libsystemd-pkgconfig.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/static-libsystemd-pkgconfig.patch
new file mode 100644
index 0000000000..1f0e911cfc
--- /dev/null
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/static-libsystemd-pkgconfig.patch
@@ -0,0 +1,9 @@
1--- a/src/libsystemd/libsystemd.pc.in
2+++ b/src/libsystemd/libsystemd.pc.in
3@@ -16,5 +16,5 @@ Name: systemd
4 Description: systemd Library
5 URL: {{PROJECT_URL}}
6 Version: {{PROJECT_VERSION}}
7-Libs: -L${libdir} -lsystemd
8+Libs: -L${libdir} -lsystemd -lrt -lmount -lcap
9 Cflags: -I${includedir}
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_249.bb
index d50681d77b..a3ef6a747a 100644
--- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_243.bb
+++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_249.bb
@@ -8,14 +8,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
8 8
9inherit meson pkgconfig 9inherit meson pkgconfig
10 10
11DEPENDS += "gperf-native gettext-native util-linux libcap" 11DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native"
12 12
13SRCREV = "efb536d0cbe2e58f80e501d19999928c75e08f6a" 13SRCREV = "00b0393e65252bf631670604f58b844780b08c50"
14SRCBRANCH = "v243-stable" 14SRCBRANCH = "v249-stable"
15SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ 15SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \
16 file://static-libsystemd-pkgconfig.patch \ 16 file://static-libsystemd-pkgconfig.patch \
17 file://7c5fd25119a495009ea62f79e5daec34cc464628.patch \
18 file://0001-basic-linux-Sync-if_arp.h-with-Linux-5.14.patch \
19 " 17 "
20 18
21# patches needed by musl 19# patches needed by musl
@@ -26,24 +24,25 @@ SRC_URI_MUSL = "\
26 file://0004-add-fallback-parse_printf_format-implementation.patch \ 24 file://0004-add-fallback-parse_printf_format-implementation.patch \
27 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ 25 file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \
28 file://0006-Include-netinet-if_ether.h.patch \ 26 file://0006-Include-netinet-if_ether.h.patch \
29 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \ 27 file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
30 file://0008-add-missing-FTW_-macros-for-musl.patch \ 28 file://0008-add-missing-FTW_-macros-for-musl.patch \
31 file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ 29 file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
32 file://0011-Use-uintmax_t-for-handling-rlim_t.patch \ 30 file://0010-Use-uintmax_t-for-handling-rlim_t.patch \
33 file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ 31 file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \
34 file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ 32 file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \
35 file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ 33 file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
36 file://0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ 34 file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
37 file://0018-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ 35 file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
38 file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ 36 file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \
39 file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ 37 file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \
40 file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ 38 file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \
41 file://0024-test-json.c-define-M_PIl.patch \ 39 file://0019-Handle-missing-LOCK_EX.patch \
42 file://0001-do-not-disable-buffer-in-writing-files.patch \ 40 file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \
43 file://0002-src-login-brightness.c-include-sys-wait.h.patch \ 41 file://0021-test-json.c-define-M_PIl.patch \
44 file://0003-src-basic-copy.c-include-signal.h.patch \ 42 file://0022-do-not-disable-buffer-in-writing-files.patch \
45 file://0004-src-shared-cpu-set-util.h-add-__cpu_mask-definition.patch \ 43 file://0025-Handle-__cpu_mask-usage.patch \
46 file://0001-meson-Fix-reallocarray-check.patch \ 44 file://0026-Handle-missing-gshadow.patch \
45 file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
47 " 46 "
48 47
49PACKAGECONFIG ??= "gshadow idn" 48PACKAGECONFIG ??= "gshadow idn"
@@ -51,6 +50,8 @@ PACKAGECONFIG:remove:libc-musl = " gshadow idn"
51PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" 50PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
52PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" 51PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
53 52
53CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 "
54
54EXTRA_OEMESON += "-Dstatic-libsystemd=pic" 55EXTRA_OEMESON += "-Dstatic-libsystemd=pic"
55 56
56S = "${WORKDIR}/git" 57S = "${WORKDIR}/git"
@@ -58,6 +59,7 @@ S = "${WORKDIR}/git"
58do_compile() { 59do_compile() {
59 ninja -v ${PARALLEL_MAKE} version.h 60 ninja -v ${PARALLEL_MAKE} version.h
60 ninja -v ${PARALLEL_MAKE} libsystemd.a 61 ninja -v ${PARALLEL_MAKE} libsystemd.a
62 ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc
61} 63}
62 64
63do_install () { 65do_install () {