summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2024-12-17 15:37:51 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-23 11:43:04 +0000
commitddf7d3c830d4347d54884d94f83a5d5a5453ebb1 (patch)
treeadcaebed8f8f206e5b41250f5f468dc53878841d
parentffa94d6c765dfb7e0ce3d15e8e45efab25823698 (diff)
downloadpoky-ddf7d3c830d4347d54884d94f83a5d5a5453ebb1.tar.gz
systemd: upgrade from 256.9 to 257
Patch changes: * 0003-coredump-set-ProtectHome-to-read-only.patch is drop as it's a backported patch. * 0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch is drop as AT_SYMLINK_NOFOLLOW has been supportd in musl. * Other patches are either refreshed or changed to fit the current version. systemd-boot changes: * Use src/boot instead src/boot/efi in do_install and do_deploy. See upstream change 97318131fd06 (Rename src/boot/efi to just src/boot). (From OE-Core rev: 3406ca05be08b12ddd2835361f5ac638e2669dd2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd-boot-native_257.bb (renamed from meta/recipes-core/systemd/systemd-boot-native_256.9.bb)0
-rw-r--r--meta/recipes-core/systemd/systemd-boot_257.bb (renamed from meta/recipes-core/systemd/systemd-boot_256.9.bb)8
-rw-r--r--meta/recipes-core/systemd/systemd.inc4
-rw-r--r--meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch8
-rw-r--r--meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch6
-rw-r--r--meta/recipes-core/systemd/systemd/0003-coredump-set-ProtectHome-to-read-only.patch38
-rw-r--r--meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch (renamed from meta/recipes-core/systemd/systemd/0004-missing_type.h-add-comparison_fn_t.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch (renamed from meta/recipes-core/systemd/systemd/0005-add-fallback-parse_printf_format-implementation.patch)16
-rw-r--r--meta/recipes-core/systemd/systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch (renamed from meta/recipes-core/systemd/systemd/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch)12
-rw-r--r--meta/recipes-core/systemd/systemd/0006-add-missing-FTW_-macros-for-musl.patch (renamed from meta/recipes-core/systemd/systemd/0007-add-missing-FTW_-macros-for-musl.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch (renamed from meta/recipes-core/systemd/systemd/0008-Use-uintmax_t-for-handling-rlim_t.patch)14
-rw-r--r--meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch (renamed from meta/recipes-core/systemd/systemd/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch)10
-rw-r--r--meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch (renamed from meta/recipes-core/systemd/systemd/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch)10
-rw-r--r--meta/recipes-core/systemd/systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch99
-rw-r--r--meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch (renamed from meta/recipes-core/systemd/systemd/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch)12
-rw-r--r--meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch (renamed from meta/recipes-core/systemd/systemd/0013-avoid-redefinition-of-prctl_mm_map-structure.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch (renamed from meta/recipes-core/systemd/systemd/0014-do-not-disable-buffer-in-writing-files.patch)258
-rw-r--r--meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch (renamed from meta/recipes-core/systemd/systemd/0015-Handle-__cpu_mask-usage.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch (renamed from meta/recipes-core/systemd/systemd/0016-Handle-missing-gshadow.patch)32
-rw-r--r--meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch (renamed from meta/recipes-core/systemd/systemd/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch)11
-rw-r--r--meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch (renamed from meta/recipes-core/systemd/systemd/0018-pass-correct-parameters-to-getdents64.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch (renamed from meta/recipes-core/systemd/systemd/0019-Adjust-for-musl-headers.patch)100
-rw-r--r--meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch (renamed from meta/recipes-core/systemd/systemd/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch (renamed from meta/recipes-core/systemd/systemd/0021-errno-util-Make-STRERROR-portable-for-musl.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch (renamed from meta/recipes-core/systemd/systemd/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch)12
-rw-r--r--meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch (renamed from meta/recipes-core/systemd/systemd/0023-shared-Do-not-use-malloc_info-on-musl.patch)10
-rw-r--r--meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch (renamed from meta/recipes-core/systemd/systemd/0024-avoid-missing-LOCK_EX-declaration.patch)16
-rw-r--r--meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch (renamed from meta/recipes-core/systemd/systemd/0025-include-signal.h-to-avoid-the-undeclared-error.patch)16
-rw-r--r--meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch (renamed from meta/recipes-core/systemd/systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch)10
-rw-r--r--meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch288
-rw-r--r--meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch (renamed from meta/recipes-core/systemd/systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch)6
-rw-r--r--meta/recipes-core/systemd/systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch76
-rw-r--r--meta/recipes-core/systemd/systemd_257.bb (renamed from meta/recipes-core/systemd/systemd_256.9.bb)50
33 files changed, 604 insertions, 566 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot-native_256.9.bb b/meta/recipes-core/systemd/systemd-boot-native_257.bb
index 58db408dcf..58db408dcf 100644
--- a/meta/recipes-core/systemd/systemd-boot-native_256.9.bb
+++ b/meta/recipes-core/systemd/systemd-boot-native_257.bb
diff --git a/meta/recipes-core/systemd/systemd-boot_256.9.bb b/meta/recipes-core/systemd/systemd-boot_257.bb
index 10b532d47c..6a50ac05aa 100644
--- a/meta/recipes-core/systemd/systemd-boot_256.9.bb
+++ b/meta/recipes-core/systemd/systemd-boot_257.bb
@@ -54,13 +54,13 @@ COMPATIBLE_HOST:x86-x32 = "null"
54 54
55do_install() { 55do_install() {
56 install -d ${D}${EFI_FILES_PATH} 56 install -d ${D}${EFI_FILES_PATH}
57 install ${B}/src/boot/efi/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE} 57 install ${B}/src/boot/systemd-boot*.efi ${D}${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}
58} 58}
59 59
60do_deploy () { 60do_deploy () {
61 install ${B}/src/boot/efi/systemd-boot*.efi ${DEPLOYDIR} 61 install ${B}/src/boot/systemd-boot*.efi ${DEPLOYDIR}
62 install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR} 62 install ${B}/src/boot/linux*.efi.stub ${DEPLOYDIR}
63 install ${B}/src/boot/efi/addon*.efi.stub ${DEPLOYDIR} 63 install ${B}/src/boot/addon*.efi.stub ${DEPLOYDIR}
64} 64}
65 65
66addtask deploy before do_build after do_compile 66addtask deploy before do_build after do_compile
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 2d0ddf7bbd..67b9e28ce1 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later"
15LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ 15LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
16 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" 16 file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
17 17
18SRCREV = "f15fd96efd5ebdfb18746acb0cbb35a4331b4d8b" 18SRCREV = "70bae7648f2c18010187c9cf20093155eaa26029"
19SRCBRANCH = "v256-stable" 19SRCBRANCH = "v257-stable"
20SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH}" 20SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH}"
21 21
22S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 4ffcb2ed46..5101f9227e 100644
--- a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -1,7 +1,7 @@
1From ca94c86736ca7917e6c50d09d6c6ba56ba139709 Mon Sep 17 00:00:00 2001 1From e5fd143f215f072404c544f694cb026a4231503e Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 21 Feb 2019 16:23:24 +0800 3Date: Thu, 21 Feb 2019 16:23:24 +0800
4Subject: [PATCH 01/27] binfmt: Don't install dependency links at install time 4Subject: [PATCH 01/26] binfmt: Don't install dependency links at install time
5 for the binfmt services 5 for the binfmt services
6 6
7use [Install] blocks so that they get created when the service is enabled 7use [Install] blocks so that they get created when the service is enabled
@@ -25,7 +25,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
25 3 files changed, 7 insertions(+), 2 deletions(-) 25 3 files changed, 7 insertions(+), 2 deletions(-)
26 26
27diff --git a/units/meson.build b/units/meson.build 27diff --git a/units/meson.build b/units/meson.build
28index b231341a1f..b613a188a4 100644 28index 96f4852741..0a3a4fee67 100644
29--- a/units/meson.build 29--- a/units/meson.build
30+++ b/units/meson.build 30+++ b/units/meson.build
31@@ -156,7 +156,6 @@ units = [ 31@@ -156,7 +156,6 @@ units = [
@@ -75,5 +75,5 @@ index 318bf8efc2..6ef684861d 100644
75+[Install] 75+[Install]
76+WantedBy=sysinit.target 76+WantedBy=sysinit.target
77-- 77--
782.45.1 782.34.1
79 79
diff --git a/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch
index 36cc5678c0..d8bb572261 100644
--- a/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch
+++ b/meta/recipes-core/systemd/systemd/0002-implment-systemd-sysv-install-for-OE.patch
@@ -1,7 +1,7 @@
1From 40ae40de3db990a7e56694f24fc625b1b71a98f7 Mon Sep 17 00:00:00 2001 1From fab8c573d06340868f070446118673b1c23584c5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 5 Sep 2015 06:31:47 +0000 3Date: Sat, 5 Sep 2015 06:31:47 +0000
4Subject: [PATCH 02/27] implment systemd-sysv-install for OE 4Subject: [PATCH 02/26] implment systemd-sysv-install for OE
5 5
6Use update-rc.d for enabling/disabling and status command 6Use update-rc.d for enabling/disabling and status command
7to check the status of the sysv service 7to check the status of the sysv service
@@ -39,5 +39,5 @@ index cb58d8243b..000bdf6165 100755
39 *) 39 *)
40 usage ;; 40 usage ;;
41-- 41--
422.45.1 422.34.1
43 43
diff --git a/meta/recipes-core/systemd/systemd/0003-coredump-set-ProtectHome-to-read-only.patch b/meta/recipes-core/systemd/systemd/0003-coredump-set-ProtectHome-to-read-only.patch
deleted file mode 100644
index feb1178d23..0000000000
--- a/meta/recipes-core/systemd/systemd/0003-coredump-set-ProtectHome-to-read-only.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 4ac1755be2d6c141fae7e57c42936e507c5b54e3 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Fri, 6 Sep 2024 10:36:28 +0200
4Subject: [PATCH] coredump: set ProtectHome to read-only
5
6In https://github.com/systemd/systemd/pull/5283/commits/924453c22599cc246746a0233b2f52a27ade0819
7ProtectHome was set to true for systemd-coredump in order to reduce risk, since an attacker could craft a malicious binary in order to compromise systemd-coredump.
8At that point the object analysis was done in the main systemd-coredump process.
9Because of this systemd-coredump is unable to product symbolicated call-stacks for binaries running under /home ("n/a" is shown instead of function names).
10
11However, later in https://github.com/systemd/systemd/commit/61aea456c12c54f49c4a76259af130e576130ce9 systemd-coredump was changed to do the object analysis in a forked process,
12covering those security concerns.
13
14Let's set ProtectHome to read-only so that systemd-coredump produces symbolicated call-stacks for processes running under /home.
15
16Upstream-Status: Backport [https://github.com/systemd/systemd/commit/4ac1755be2d6c141fae7e57c42936e507c5b54e3]
17
18Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
19---
20 units/systemd-coredump@.service.in | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/units/systemd-coredump@.service.in b/units/systemd-coredump@.service.in
24index 012c60d2f6..fa3206d07b 100644
25--- a/units/systemd-coredump@.service.in
26+++ b/units/systemd-coredump@.service.in
27@@ -28,7 +28,7 @@ PrivateDevices=yes
28 PrivateNetwork=yes
29 PrivateTmp=yes
30 ProtectControlGroups=yes
31-ProtectHome=yes
32+ProtectHome=read-only
33 ProtectHostname=yes
34 ProtectKernelModules=yes
35 ProtectKernelTunables=yes
36--
372.43.0
38
diff --git a/meta/recipes-core/systemd/systemd/0004-missing_type.h-add-comparison_fn_t.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch
index f4456f3c15..f2094eb71d 100644
--- a/meta/recipes-core/systemd/systemd/0004-missing_type.h-add-comparison_fn_t.patch
+++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-comparison_fn_t.patch
@@ -1,7 +1,7 @@
1From 34b7e1ed3b9a896db6fad435fd141c385c7337d1 Mon Sep 17 00:00:00 2001 1From f99ef6c4407b56e8d15455fe27eb732ada87215b 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 04/27] missing_type.h: add comparison_fn_t 4Subject: [PATCH 03/26] missing_type.h: add comparison_fn_t
5 5
6Make it work with musl where comparison_fn_t and is not provided. 6Make it work with musl where comparison_fn_t and is not provided.
7 7
@@ -45,7 +45,7 @@ index 9c818bd747..ef10c8be2c 100644
45 /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the 45 /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
46 * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that 46 * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
47diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c 47diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
48index a0b673f65f..29dd2fee16 100644 48index 7dcc35d8d5..87b8d6aad6 100644
49--- a/src/libsystemd/sd-journal/catalog.c 49--- a/src/libsystemd/sd-journal/catalog.c
50+++ b/src/libsystemd/sd-journal/catalog.c 50+++ b/src/libsystemd/sd-journal/catalog.c
51@@ -29,6 +29,7 @@ 51@@ -29,6 +29,7 @@
@@ -57,5 +57,5 @@ index a0b673f65f..29dd2fee16 100644
57 const char * const catalog_file_dirs[] = { 57 const char * const catalog_file_dirs[] = {
58 "/usr/local/lib/systemd/catalog/", 58 "/usr/local/lib/systemd/catalog/",
59-- 59--
602.45.1 602.34.1
61 61
diff --git a/meta/recipes-core/systemd/systemd/0005-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
index b0865b32af..f9a45bb40b 100644
--- a/meta/recipes-core/systemd/systemd/0005-add-fallback-parse_printf_format-implementation.patch
+++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
@@ -1,7 +1,7 @@
1From 4a4005583e2debe491850229aa5ae2a97770532d Mon Sep 17 00:00:00 2001 1From 34fe809cf686c1a81db5f3f027e33fece350ba0b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sat, 22 May 2021 20:26:24 +0200 3Date: Sat, 22 May 2021 20:26:24 +0200
4Subject: [PATCH 05/27] add fallback parse_printf_format implementation 4Subject: [PATCH 04/26] add fallback parse_printf_format implementation
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
@@ -22,22 +22,22 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22 create mode 100644 src/basic/parse-printf-format.h 22 create mode 100644 src/basic/parse-printf-format.h
23 23
24diff --git a/meson.build b/meson.build 24diff --git a/meson.build b/meson.build
25index 52723bef09..e20bf3af8a 100644 25index bffda86845..4146f4beef 100644
26--- a/meson.build 26--- a/meson.build
27+++ b/meson.build 27+++ b/meson.build
28@@ -753,6 +753,7 @@ foreach header : ['crypt.h', 28@@ -773,6 +773,7 @@ foreach header : ['crypt.h',
29 'linux/ioprio.h',
29 'linux/memfd.h', 30 'linux/memfd.h',
30 'linux/time_types.h', 31 'linux/time_types.h',
31 'linux/vm_sockets.h',
32+ 'printf.h', 32+ 'printf.h',
33 'sys/auxv.h', 33 'sys/auxv.h',
34 'sys/sdt.h', 34 'sys/sdt.h',
35 'threads.h', 35 'threads.h',
36diff --git a/src/basic/meson.build b/src/basic/meson.build 36diff --git a/src/basic/meson.build b/src/basic/meson.build
37index 9a214575a5..b49b6ade56 100644 37index e02f787c75..9435df895d 100644
38--- a/src/basic/meson.build 38--- a/src/basic/meson.build
39+++ b/src/basic/meson.build 39+++ b/src/basic/meson.build
40@@ -189,6 +189,11 @@ endforeach 40@@ -188,6 +188,11 @@ endforeach
41 41
42 basic_sources += generated_gperf_headers 42 basic_sources += generated_gperf_headers
43 43
@@ -430,5 +430,5 @@ index 7d02b57d7b..75e8e08add 100644
430 #define SNDBUF_SIZE (8*1024*1024) 430 #define SNDBUF_SIZE (8*1024*1024)
431 431
432-- 432--
4332.45.1 4332.34.1
434 434
diff --git a/meta/recipes-core/systemd/systemd/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
index e7a0abcf9a..1b5e0d54c4 100644
--- a/meta/recipes-core/systemd/systemd/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
+++ b/meta/recipes-core/systemd/systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -1,7 +1,7 @@
1From ed836c3478e1193e99e37d50db96d124796a3322 Mon Sep 17 00:00:00 2001 1From d368a0317c747961f69a455a09a3de3fd13410a2 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 06/27] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not 4Subject: [PATCH 05/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
5 defined 5 defined
6 6
7If the standard library doesn't provide brace 7If the standard library doesn't provide brace
@@ -115,7 +115,7 @@ index 49d71f15c7..0a49ebcc17 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 807925f199..b4f86fc611 100644 118index 86bf16356d..da552dbaab 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@@ -73,6 +73,12 @@ 121@@ -73,6 +73,12 @@
@@ -131,7 +131,7 @@ index 807925f199..b4f86fc611 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@@ -2570,7 +2576,9 @@ finish: 134@@ -2573,7 +2579,9 @@ finish:
135 135
136 static int glob_item(Context *c, Item *i, action_t action) { 136 static int glob_item(Context *c, Item *i, action_t action) {
137 _cleanup_globfree_ glob_t g = { 137 _cleanup_globfree_ glob_t g = {
@@ -141,7 +141,7 @@ index 807925f199..b4f86fc611 100644
141 }; 141 };
142 int r; 142 int r;
143 143
144@@ -2598,7 +2606,9 @@ static int glob_item_recursively( 144@@ -2601,7 +2609,9 @@ static int glob_item_recursively(
145 fdaction_t action) { 145 fdaction_t action) {
146 146
147 _cleanup_globfree_ glob_t g = { 147 _cleanup_globfree_ glob_t g = {
@@ -152,5 +152,5 @@ index 807925f199..b4f86fc611 100644
152 int r; 152 int r;
153 153
154-- 154--
1552.45.1 1552.34.1
156 156
diff --git a/meta/recipes-core/systemd/systemd/0007-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0006-add-missing-FTW_-macros-for-musl.patch
index 474a7d38d8..578411c4cf 100644
--- a/meta/recipes-core/systemd/systemd/0007-add-missing-FTW_-macros-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0006-add-missing-FTW_-macros-for-musl.patch
@@ -1,7 +1,7 @@
1From 8320725f1a9088623da8753c7077473b98a63107 Mon Sep 17 00:00:00 2001 1From 54b6e10aea2b0fb52782c3a71f06654a89b46bff 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 07/27] add missing FTW_ macros for musl 4Subject: [PATCH 06/26] 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
@@ -40,5 +40,5 @@ index 8684d064ec..70fc2b5376 100644
40 static char **list_nftw = NULL; 40 static char **list_nftw = NULL;
41 41
42-- 42--
432.45.1 432.34.1
44 44
diff --git a/meta/recipes-core/systemd/systemd/0008-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch
index c8598ed2ea..b4a570e1f5 100644
--- a/meta/recipes-core/systemd/systemd/0008-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/meta/recipes-core/systemd/systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,7 +1,7 @@
1From 41abe1a4136babfe5df63e9561dcf29d3c8fe6e9 Mon Sep 17 00:00:00 2001 1From 85d8c4c27e855d54c1740902a836c8f2aea9bebc 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 08/27] Use uintmax_t for handling rlim_t 4Subject: [PATCH 07/26] 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
@@ -27,10 +27,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
27 3 files changed, 9 insertions(+), 15 deletions(-) 27 3 files changed, 9 insertions(+), 15 deletions(-)
28 28
29diff --git a/src/basic/format-util.h b/src/basic/format-util.h 29diff --git a/src/basic/format-util.h b/src/basic/format-util.h
30index ba7cff6a8b..2736abb07b 100644 30index b528c005ca..41c4c095be 100644
31--- a/src/basic/format-util.h 31--- a/src/basic/format-util.h
32+++ b/src/basic/format-util.h 32+++ b/src/basic/format-util.h
33@@ -42,13 +42,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); 33@@ -41,13 +41,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
34 # error Unknown timex member size 34 # error Unknown timex member size
35 #endif 35 #endif
36 36
@@ -86,10 +86,10 @@ index a9f7b87f28..059c67731d 100644
86 return 1; 86 return 1;
87 } 87 }
88diff --git a/src/core/execute.c b/src/core/execute.c 88diff --git a/src/core/execute.c b/src/core/execute.c
89index 513e95e09d..0e269617f8 100644 89index 3d55b0b772..4824ff159e 100644
90--- a/src/core/execute.c 90--- a/src/core/execute.c
91+++ b/src/core/execute.c 91+++ b/src/core/execute.c
92@@ -1067,9 +1067,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { 92@@ -1162,9 +1162,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
93 for (unsigned i = 0; i < RLIM_NLIMITS; i++) 93 for (unsigned i = 0; i < RLIM_NLIMITS; i++)
94 if (c->rlimit[i]) { 94 if (c->rlimit[i]) {
95 fprintf(f, "%sLimit%s: " RLIM_FMT "\n", 95 fprintf(f, "%sLimit%s: " RLIM_FMT "\n",
@@ -102,5 +102,5 @@ index 513e95e09d..0e269617f8 100644
102 102
103 if (c->ioprio_set) { 103 if (c->ioprio_set) {
104-- 104--
1052.45.1 1052.34.1
106 106
diff --git a/meta/recipes-core/systemd/systemd/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch
index 162650725d..22e2ceadcc 100644
--- a/meta/recipes-core/systemd/systemd/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch
+++ b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch
@@ -1,7 +1,7 @@
1From ea8e85d92f67a7af8577a4ce7c67c7aaee65d10c Mon Sep 17 00:00:00 2001 1From f4cd939c7cc1ce0a59bab2693768f2c95d9ced00 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 10/27] Define glibc compatible basename() for non-glibc 4Subject: [PATCH 08/26] Define glibc compatible basename() for non-glibc
5 systems 5 systems
6 6
7Fixes builds with musl, even though systemd is adamant about 7Fixes builds with musl, even though systemd is adamant about
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 4 insertions(+) 15 1 file changed, 4 insertions(+)
16 16
17diff --git a/src/basic/string-util.h b/src/basic/string-util.h 17diff --git a/src/basic/string-util.h b/src/basic/string-util.h
18index ff5efbcf55..d1a6bb0e76 100644 18index cc6aa183c0..0b035125cd 100644
19--- a/src/basic/string-util.h 19--- a/src/basic/string-util.h
20+++ b/src/basic/string-util.h 20+++ b/src/basic/string-util.h
21@@ -26,6 +26,10 @@ 21@@ -27,6 +27,10 @@
22 #define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */ 22 #define URI_UNRESERVED ALPHANUMERICAL "-._~" /* [RFC3986] */
23 #define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */ 23 #define URI_VALID URI_RESERVED URI_UNRESERVED /* [RFC3986] */
24 24
@@ -30,5 +30,5 @@ index ff5efbcf55..d1a6bb0e76 100644
30 if (!haystack || !needle) 30 if (!haystack || !needle)
31 return NULL; 31 return NULL;
32-- 32--
332.45.1 332.34.1
34 34
diff --git a/meta/recipes-core/systemd/systemd/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
index 60cec6dc7e..8e3eb15b54 100644
--- a/meta/recipes-core/systemd/systemd/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
+++ b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
@@ -1,7 +1,7 @@
1From 7c8634c441401b034cd4bcf4b916a7042076fca8 Mon Sep 17 00:00:00 2001 1From 6959db351fdd551d46e22667deec6032552b2662 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 11/27] Do not disable buffering when writing to oom_score_adj 4Subject: [PATCH 09/26] 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.
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
24 1 file changed, 1 insertion(+), 1 deletion(-) 24 1 file changed, 1 insertion(+), 1 deletion(-)
25 25
26diff --git a/src/basic/process-util.c b/src/basic/process-util.c 26diff --git a/src/basic/process-util.c b/src/basic/process-util.c
27index c9d968dee0..7d6d3ce7db 100644 27index 3253a9c3fb..772c4082a1 100644
28--- a/src/basic/process-util.c 28--- a/src/basic/process-util.c
29+++ b/src/basic/process-util.c 29+++ b/src/basic/process-util.c
30@@ -1816,7 +1816,7 @@ int set_oom_score_adjust(int value) { 30@@ -1848,7 +1848,7 @@ int set_oom_score_adjust(int value) {
31 xsprintf(t, "%i", value); 31 xsprintf(t, "%i", value);
32 32
33 return write_string_file("/proc/self/oom_score_adj", t, 33 return write_string_file("/proc/self/oom_score_adj", t,
@@ -37,5 +37,5 @@ index c9d968dee0..7d6d3ce7db 100644
37 37
38 int get_oom_score_adjust(int *ret) { 38 int get_oom_score_adjust(int *ret) {
39-- 39--
402.45.1 402.34.1
41 41
diff --git a/meta/recipes-core/systemd/systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
deleted file mode 100644
index 851dcbd553..0000000000
--- a/meta/recipes-core/systemd/systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 8af5d1e3c0dc7e71f7a4aee0f539a5d772d47354 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 10 Oct 2017 14:33:30 -0700
4Subject: [PATCH 09/27] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()
5
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:
8
9 http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
10 http://www.openwall.com/lists/musl/2015/02/05/2
11
12Note that laccess() is never passing AT_EACCESS so a lot of the
13discussion in the links above doesn't apply. Note also that
14(currently) all systemd callers of laccess() pass mode as F_OK, so
15only check for existence of a file, not access permissions.
16Therefore, in this case, the only distiction between faccessat()
17with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
18for broken symlinks; laccess() on a broken symlink will succeed with
19(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
20
21The laccess() macros was added to systemd some time ago and it's not
22clear if or why it needs to return success for broken symlinks. Maybe
23just historical and not actually necessary or desired behaviour?
24
25Upstream-Status: Inappropriate [musl specific]
26
27Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
28---
29 src/basic/fs-util.h | 21 ++++++++++++++++++++-
30 src/shared/base-filesystem.c | 6 +++---
31 2 files changed, 23 insertions(+), 4 deletions(-)
32
33diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
34index 3e2db95304..d5747416b0 100644
35--- a/src/basic/fs-util.h
36+++ b/src/basic/fs-util.h
37@@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]);
38 int fd_warn_permissions(const char *path, int fd);
39 int stat_warn_permissions(const char *path, const struct stat *st);
40
41+/*
42+ Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
43+ do and it's not portable (not supported by musl). See:
44+
45+ http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
46+ http://www.openwall.com/lists/musl/2015/02/05/2
47+
48+ Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
49+ the links above doesn't apply. Note also that (currently) all systemd callers
50+ of laccess() pass mode as F_OK, so only check for existence of a file, not
51+ access permissions. Therefore, in this case, the only distiction between
52+ faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
53+ behaviour for broken symlinks; laccess() on a broken symlink will succeed
54+ with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
55+
56+ The laccess() macros was added to systemd some time ago and it's not clear if
57+ or why it needs to return success for broken symlinks. Maybe just historical
58+ and not actually necessary or desired behaviour?
59+*/
60 #define laccess(path, mode) \
61- RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW))
62+ RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0))
63
64 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
65
66diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
67index a4e2dae245..67aa8ea1f2 100644
68--- a/src/shared/base-filesystem.c
69+++ b/src/shared/base-filesystem.c
70@@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
71 /* The "root" parameter is decoration only – it's only used as part of log messages */
72
73 for (size_t i = 0; i < ELEMENTSOF(table); i++) {
74- if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
75+ if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
76 continue;
77
78 if (table[i].target) { /* Create as symlink? */
79@@ -153,7 +153,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
80
81 /* check if one of the targets exists */
82 NULSTR_FOREACH(s, table[i].target) {
83- if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
84+ if (faccessat(fd, s, F_OK, 0) < 0)
85 continue;
86
87 /* check if a specific file exists at the target path */
88@@ -164,7 +164,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
89 if (!p)
90 return log_oom();
91
92- if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
93+ if (faccessat(fd, p, F_OK, 0) < 0)
94 continue;
95 }
96
97--
982.45.1
99
diff --git a/meta/recipes-core/systemd/systemd/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
index aa3c45cb5f..0dfb77890e 100644
--- a/meta/recipes-core/systemd/systemd/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
+++ b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
@@ -1,7 +1,7 @@
1From 4a2df0bba1741914617ca1271e2bc68a5d9e5dac Mon Sep 17 00:00:00 2001 1From b7f6c245b4ae72999f23eecc2bbb6d6fb8db667c 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 12/27] distinguish XSI-compliant strerror_r from GNU-specifi 4Subject: [PATCH 10/26] 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.
@@ -24,10 +24,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
24 2 files changed, 15 insertions(+), 1 deletion(-) 24 2 files changed, 15 insertions(+), 1 deletion(-)
25 25
26diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c 26diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
27index f415797700..a5c6e9a3bd 100644 27index 58c24d25c0..69a0d09d42 100644
28--- a/src/libsystemd/sd-bus/bus-error.c 28--- a/src/libsystemd/sd-bus/bus-error.c
29+++ b/src/libsystemd/sd-bus/bus-error.c 29+++ b/src/libsystemd/sd-bus/bus-error.c
30@@ -410,7 +410,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { 30@@ -405,7 +405,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
31 return; 31 return;
32 32
33 errno = 0; 33 errno = 0;
@@ -40,7 +40,7 @@ index f415797700..a5c6e9a3bd 100644
40 if (errno == ERANGE || strlen(x) >= k - 1) { 40 if (errno == ERANGE || strlen(x) >= k - 1) {
41 free(m); 41 free(m);
42 k *= 2; 42 k *= 2;
43@@ -595,8 +600,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static 43@@ -590,8 +595,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static
44 44
45 if (e && e->message) 45 if (e && e->message)
46 return e->message; 46 return e->message;
@@ -72,5 +72,5 @@ index 75e8e08add..41e5c7c2b8 100644
72 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; 72 char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
73 73
74-- 74--
752.45.1 752.34.1
76 76
diff --git a/meta/recipes-core/systemd/systemd/0013-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch
index c48bd58383..16d741cf87 100644
--- a/meta/recipes-core/systemd/systemd/0013-avoid-redefinition-of-prctl_mm_map-structure.patch
+++ b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch
@@ -1,7 +1,7 @@
1From 846b8f16cf07d9187261e06701a75eb208caa707 Mon Sep 17 00:00:00 2001 1From 43b0269e850a2fbcb6ca615258aa8f8a9b4f6a9d 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 13/27] avoid redefinition of prctl_mm_map structure 4Subject: [PATCH 11/26] 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'
@@ -28,5 +28,5 @@ index 2c9f9f6c50..65a984b564 100644
28 #include "macro.h" 28 #include "macro.h"
29 29
30-- 30--
312.45.1 312.34.1
32 32
diff --git a/meta/recipes-core/systemd/systemd/0014-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch
index e624c2d71e..00b4b777f4 100644
--- a/meta/recipes-core/systemd/systemd/0014-do-not-disable-buffer-in-writing-files.patch
+++ b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch
@@ -1,7 +1,7 @@
1From 88694101bcac461c39049962ce97ce579cc07e13 Mon Sep 17 00:00:00 2001 1From eaf26fdad00448b8cd336eb5db51e0baa8d8e588 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: Mon, 16 Dec 2024 14:37:25 +0800
4Subject: [PATCH 14/27] do not disable buffer in writing files 4Subject: [PATCH 12/26] do not disable buffer in writing files
5 5
6Do not disable buffer in writing files, otherwise we get 6Do not disable buffer in writing files, otherwise we get
7failure at boot for musl like below. 7failure at boot for musl like below.
@@ -22,35 +22,34 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
22Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 22Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
23[rebased for systemd 255.1] 23[rebased for systemd 255.1]
24--- 24---
25 src/basic/cgroup-util.c | 12 ++++++------ 25 src/basic/cgroup-util.c | 4 ++--
26 src/basic/namespace-util.c | 4 ++-- 26 src/basic/namespace-util.c | 4 ++--
27 src/basic/procfs-util.c | 4 ++-- 27 src/basic/procfs-util.c | 4 ++--
28 src/basic/sysctl-util.c | 2 +- 28 src/basic/sysctl-util.c | 2 +-
29 src/binfmt/binfmt.c | 6 +++--- 29 src/binfmt/binfmt.c | 6 +++---
30 src/core/cgroup.c | 2 +- 30 src/core/cgroup.c | 2 +-
31 src/core/ipe-setup.c | 2 +-
31 src/core/main.c | 2 +- 32 src/core/main.c | 2 +-
32 src/core/smack-setup.c | 8 ++++---- 33 src/core/smack-setup.c | 6 +++---
33 src/home/homework.c | 2 +- 34 src/home/homework.c | 2 +-
34 src/libsystemd/sd-device/sd-device.c | 2 +- 35 src/libsystemd/sd-device/sd-device.c | 2 +-
35 src/nspawn/nspawn-cgroup.c | 2 +- 36 src/nspawn/nspawn-cgroup.c | 2 +-
36 src/nspawn/nspawn.c | 6 +++--- 37 src/nspawn/nspawn.c | 6 +++---
37 src/shared/binfmt-util.c | 2 +- 38 src/shared/binfmt-util.c | 2 +-
38 src/shared/cgroup-setup.c | 6 +++--- 39 src/shared/cgroup-setup.c | 12 ++++++------
39 src/shared/coredump-util.c | 4 ++-- 40 src/shared/coredump-util.c | 2 +-
40 src/shared/hibernate-util.c | 4 ++-- 41 src/shared/hibernate-util.c | 4 ++--
41 src/shared/smack-util.c | 2 +- 42 src/shared/smack-util.c | 2 +-
42 src/shared/watchdog.c | 2 +- 43 src/sleep/sleep.c | 2 +-
43 src/sleep/sleep.c | 4 ++--
44 src/storagetm/storagetm.c | 24 ++++++++++++------------ 44 src/storagetm/storagetm.c | 24 ++++++++++++------------
45 src/udev/udev-rules.c | 1 -
46 src/vconsole/vconsole-setup.c | 2 +- 45 src/vconsole/vconsole-setup.c | 2 +-
47 22 files changed, 51 insertions(+), 52 deletions(-) 46 21 files changed, 47 insertions(+), 47 deletions(-)
48 47
49diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c 48diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
50index 553ee6075a..a3704baf6a 100644 49index 309dccb45a..7aec5072a0 100644
51--- a/src/basic/cgroup-util.c 50--- a/src/basic/cgroup-util.c
52+++ b/src/basic/cgroup-util.c 51+++ b/src/basic/cgroup-util.c
53@@ -457,7 +457,7 @@ int cg_kill_kernel_sigkill(const char *path) { 52@@ -495,7 +495,7 @@ int cg_kill_kernel_sigkill(const char *path) {
54 if (r < 0) 53 if (r < 0)
55 return r; 54 return r;
56 55
@@ -59,43 +58,7 @@ index 553ee6075a..a3704baf6a 100644
59 if (r < 0) 58 if (r < 0)
60 return log_debug_errno(r, "Failed to write to cgroup.kill for cgroup '%s': %m", path); 59 return log_debug_errno(r, "Failed to write to cgroup.kill for cgroup '%s': %m", path);
61 60
62@@ -885,7 +885,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { 61@@ -1721,7 +1721,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
63
64 sc = strstrip(contents);
65 if (isempty(sc)) {
66- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER);
67+ r = write_string_file(fs, agent, 0);
68 if (r < 0)
69 return r;
70 } else if (!path_equal(sc, agent))
71@@ -903,7 +903,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
72
73 sc = strstrip(contents);
74 if (streq(sc, "0")) {
75- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
76+ r = write_string_file(fs, "1", 0);
77 if (r < 0)
78 return r;
79
80@@ -930,7 +930,7 @@ int cg_uninstall_release_agent(const char *controller) {
81 if (r < 0)
82 return r;
83
84- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER);
85+ r = write_string_file(fs, "0", 0);
86 if (r < 0)
87 return r;
88
89@@ -940,7 +940,7 @@ int cg_uninstall_release_agent(const char *controller) {
90 if (r < 0)
91 return r;
92
93- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER);
94+ r = write_string_file(fs, "", 0);
95 if (r < 0)
96 return r;
97
98@@ -1833,7 +1833,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
99 if (r < 0) 62 if (r < 0)
100 return r; 63 return r;
101 64
@@ -105,10 +68,10 @@ index 553ee6075a..a3704baf6a 100644
105 68
106 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { 69 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
107diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c 70diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c
108index 5b4e43f921..42a84ded55 100644 71index 332e8cdfd5..804498127d 100644
109--- a/src/basic/namespace-util.c 72--- a/src/basic/namespace-util.c
110+++ b/src/basic/namespace-util.c 73+++ b/src/basic/namespace-util.c
111@@ -325,12 +325,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { 74@@ -354,12 +354,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) {
112 freeze(); 75 freeze();
113 76
114 xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); 77 xsprintf(path, "/proc/" PID_FMT "/uid_map", pid);
@@ -144,15 +107,15 @@ index d7cfcd9105..58fb5918a3 100644
144 uint64_t threads_max; 107 uint64_t threads_max;
145 108
146diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c 109diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
147index 9a1933f579..7d6fc65ee1 100644 110index 2feb4917d7..4c74620a00 100644
148--- a/src/basic/sysctl-util.c 111--- a/src/basic/sysctl-util.c
149+++ b/src/basic/sysctl-util.c 112+++ b/src/basic/sysctl-util.c
150@@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) { 113@@ -97,7 +97,7 @@ int sysctl_write_full(const char *property, const char *value, Hashmap **shadow)
151 114 if (r < 0)
152 log_debug("Setting '%s' to '%s'", p, value); 115 return r;
153 116
154- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); 117- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
155+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); 118+ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0 | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
156 } 119 }
157 120
158 int sysctl_writef(const char *property, const char *format, ...) { 121 int sysctl_writef(const char *property, const char *format, ...) {
@@ -188,23 +151,36 @@ index d21f3f79ff..258607cc7e 100644
188 log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); 151 log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m");
189 else 152 else
190diff --git a/src/core/cgroup.c b/src/core/cgroup.c 153diff --git a/src/core/cgroup.c b/src/core/cgroup.c
191index 34fd2a250c..cb1a6d01eb 100644 154index 6933aae54d..ab6fccc0e4 100644
192--- a/src/core/cgroup.c 155--- a/src/core/cgroup.c
193+++ b/src/core/cgroup.c 156+++ b/src/core/cgroup.c
194@@ -5173,7 +5173,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { 157@@ -5167,7 +5167,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) {
195 freezer_state_to_string(u->freezer_state), 158 if (r < 0)
196 freezer_state_to_string(next)); 159 return r;
197 160
198- r = write_string_file(path, one_zero(target == FREEZER_FROZEN), WRITE_STRING_FILE_DISABLE_BUFFER); 161- r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), WRITE_STRING_FILE_DISABLE_BUFFER);
199+ r = write_string_file(path, one_zero(target == FREEZER_FROZEN), 0); 162+ r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), 0);
200 if (r < 0) 163 if (r < 0)
201 return r; 164 return r;
202 165
166diff --git a/src/core/ipe-setup.c b/src/core/ipe-setup.c
167index 4648d43829..80d03d87d4 100644
168--- a/src/core/ipe-setup.c
169+++ b/src/core/ipe-setup.c
170@@ -94,7 +94,7 @@ int ipe_setup(void) {
171 if (!activate_path)
172 return log_oom();
173
174- r = write_string_file(activate_path, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
175+ r = write_string_file(activate_path, "1", 0);
176 if (r == -ESTALE) {
177 log_debug_errno(r,
178 "IPE policy %s is already loaded with a version that is equal or higher, skipping.",
203diff --git a/src/core/main.c b/src/core/main.c 179diff --git a/src/core/main.c b/src/core/main.c
204index 4b8a315d86..051a31ba84 100644 180index 172742c769..e68ce2a6d8 100644
205--- a/src/core/main.c 181--- a/src/core/main.c
206+++ b/src/core/main.c 182+++ b/src/core/main.c
207@@ -1789,7 +1789,7 @@ static void initialize_core_pattern(bool skip_setup) { 183@@ -1812,7 +1812,7 @@ static void initialize_core_pattern(bool skip_setup) {
208 if (getpid_cached() != 1) 184 if (getpid_cached() != 1)
209 return; 185 return;
210 186
@@ -214,7 +190,7 @@ index 4b8a315d86..051a31ba84 100644
214 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", 190 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m",
215 arg_early_core_pattern); 191 arg_early_core_pattern);
216diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c 192diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
217index 7ea902b6f9..1aef2988d0 100644 193index 7ea902b6f9..ee4cd56023 100644
218--- a/src/core/smack-setup.c 194--- a/src/core/smack-setup.c
219+++ b/src/core/smack-setup.c 195+++ b/src/core/smack-setup.c
220@@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) { 196@@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) {
@@ -230,8 +206,7 @@ index 7ea902b6f9..1aef2988d0 100644
230 if (r < 0) 206 if (r < 0)
231 log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m"); 207 log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m");
232 r = write_string_file("/sys/fs/smackfs/netlabel", 208 r = write_string_file("/sys/fs/smackfs/netlabel",
233- "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); 209 "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
234+ "0.0.0.0/0 " SMACK_RUN_LABEL, 0);
235 if (r < 0) 210 if (r < 0)
236 log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m"); 211 log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m");
237- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER); 212- r = write_string_file("/sys/fs/smackfs/netlabel", "127.0.0.1 -CIPSO", WRITE_STRING_FILE_DISABLE_BUFFER);
@@ -240,24 +215,23 @@ index 7ea902b6f9..1aef2988d0 100644
240 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); 215 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
241 #endif 216 #endif
242diff --git a/src/home/homework.c b/src/home/homework.c 217diff --git a/src/home/homework.c b/src/home/homework.c
243index 482db23dbc..ed6b8d271f 100644 218index 00e74894b3..7457113efe 100644
244--- a/src/home/homework.c 219--- a/src/home/homework.c
245+++ b/src/home/homework.c 220+++ b/src/home/homework.c
246@@ -302,8 +302,8 @@ static void drop_caches_now(void) { 221@@ -304,7 +304,7 @@ static void drop_caches_now(void) {
247 /* Drop file system caches now. See https://docs.kernel.org/admin-guide/sysctl/vm.html
248 * for details. We write "3" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but 222 * for details. We write "3" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but
249 * not more. */ 223 * not more. */
250+ r = write_string_file("/proc/sys/vm/drop_caches", "3\n", 0);
251 224
252- r = write_string_file("/proc/sys/vm/drop_caches", "3\n", WRITE_STRING_FILE_DISABLE_BUFFER); 225- r = write_string_file("/proc/sys/vm/drop_caches", "3\n", WRITE_STRING_FILE_DISABLE_BUFFER);
226+ r = write_string_file("/proc/sys/vm/drop_caches", "3\n", 0);
253 if (r < 0) 227 if (r < 0)
254 log_warning_errno(r, "Failed to drop caches, ignoring: %m"); 228 log_warning_errno(r, "Failed to drop caches, ignoring: %m");
255 else 229 else
256diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c 230diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
257index d8d151835c..268cb65ec7 100644 231index 01fa90b1ff..83ab655bf4 100644
258--- a/src/libsystemd/sd-device/sd-device.c 232--- a/src/libsystemd/sd-device/sd-device.c
259+++ b/src/libsystemd/sd-device/sd-device.c 233+++ b/src/libsystemd/sd-device/sd-device.c
260@@ -2499,7 +2499,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, 234@@ -2563,7 +2563,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
261 if (!value) 235 if (!value)
262 return -ENOMEM; 236 return -ENOMEM;
263 237
@@ -267,7 +241,7 @@ index d8d151835c..268cb65ec7 100644
267 /* On failure, clear cache entry, as we do not know how it fails. */ 241 /* On failure, clear cache entry, as we do not know how it fails. */
268 device_remove_cached_sysattr_value(device, sysattr); 242 device_remove_cached_sysattr_value(device, sysattr);
269diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c 243diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
270index 4f28b4a225..c93c2c33b5 100644 244index 4f28b4a225..c899c218b2 100644
271--- a/src/nspawn/nspawn-cgroup.c 245--- a/src/nspawn/nspawn-cgroup.c
272+++ b/src/nspawn/nspawn-cgroup.c 246+++ b/src/nspawn/nspawn-cgroup.c
273@@ -93,7 +93,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { 247@@ -93,7 +93,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
@@ -275,15 +249,15 @@ index 4f28b4a225..c93c2c33b5 100644
275 249
276 sprintf(pid_string, PID_FMT, pid); 250 sprintf(pid_string, PID_FMT, pid);
277- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755); 251- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755);
278+ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755); 252+ r = write_string_file(fn, pid_string, 0|WRITE_STRING_FILE_MKDIR_0755);
279 if (r < 0) { 253 if (r < 0) {
280 log_error_errno(r, "Failed to move process: %m"); 254 log_error_errno(r, "Failed to move process: %m");
281 goto finish; 255 goto finish;
282diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c 256diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
283index 5842d3ba8f..44ff9d946c 100644 257index 500725d35f..745b6815db 100644
284--- a/src/nspawn/nspawn.c 258--- a/src/nspawn/nspawn.c
285+++ b/src/nspawn/nspawn.c 259+++ b/src/nspawn/nspawn.c
286@@ -2741,7 +2741,7 @@ static int reset_audit_loginuid(void) { 260@@ -2857,7 +2857,7 @@ static int reset_audit_loginuid(void) {
287 if (streq(p, "4294967295")) 261 if (streq(p, "4294967295"))
288 return 0; 262 return 0;
289 263
@@ -292,7 +266,7 @@ index 5842d3ba8f..44ff9d946c 100644
292 if (r < 0) { 266 if (r < 0) {
293 log_error_errno(r, 267 log_error_errno(r,
294 "Failed to reset audit login UID. This probably means that your kernel is too\n" 268 "Failed to reset audit login UID. This probably means that your kernel is too\n"
295@@ -4450,7 +4450,7 @@ static int setup_uid_map( 269@@ -4588,7 +4588,7 @@ static int setup_uid_map(
296 return log_oom(); 270 return log_oom();
297 271
298 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); 272 xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);
@@ -301,7 +275,7 @@ index 5842d3ba8f..44ff9d946c 100644
301 if (r < 0) 275 if (r < 0)
302 return log_error_errno(r, "Failed to write UID map: %m"); 276 return log_error_errno(r, "Failed to write UID map: %m");
303 277
304@@ -4460,7 +4460,7 @@ static int setup_uid_map( 278@@ -4598,7 +4598,7 @@ static int setup_uid_map(
305 return log_oom(); 279 return log_oom();
306 280
307 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); 281 xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);
@@ -324,10 +298,10 @@ index a26175474b..1413a9c72c 100644
324 return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); 298 return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m");
325 299
326diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c 300diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
327index 093b6d0d22..89d0ac612b 100644 301index 49d40f60d8..0f4aa8512a 100644
328--- a/src/shared/cgroup-setup.c 302--- a/src/shared/cgroup-setup.c
329+++ b/src/shared/cgroup-setup.c 303+++ b/src/shared/cgroup-setup.c
330@@ -364,7 +364,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { 304@@ -369,7 +369,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
331 305
332 xsprintf(c, PID_FMT "\n", pid); 306 xsprintf(c, PID_FMT "\n", pid);
333 307
@@ -336,7 +310,7 @@ index 093b6d0d22..89d0ac612b 100644
336 if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0) 310 if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0)
337 /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ 311 /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */
338 return -EUCLEAN; 312 return -EUCLEAN;
339@@ -395,7 +395,7 @@ int cg_fd_attach(int fd, pid_t pid) { 313@@ -399,7 +399,7 @@ int cg_fd_attach(int fd, pid_t pid) {
340 314
341 xsprintf(c, PID_FMT "\n", pid); 315 xsprintf(c, PID_FMT "\n", pid);
342 316
@@ -345,28 +319,46 @@ index 093b6d0d22..89d0ac612b 100644
345 } 319 }
346 320
347 int cg_attach_fallback(const char *controller, const char *path, pid_t pid) { 321 int cg_attach_fallback(const char *controller, const char *path, pid_t pid) {
348@@ -974,7 +974,7 @@ int cg_enable_everywhere( 322@@ -1049,7 +1049,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
349 return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); 323
350 } 324 sc = strstrip(contents);
351 325 if (isempty(sc)) {
352- r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER); 326- r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER);
353+ r = write_string_stream(f, s, 0); 327+ r = write_string_file(fs, agent, 0);
354 if (r < 0) { 328 if (r < 0)
355 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", 329 return r;
356 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); 330 } else if (!path_equal(sc, agent))
331@@ -1067,7 +1067,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
332
333 sc = strstrip(contents);
334 if (streq(sc, "0")) {
335- r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
336+ r = write_string_file(fs, "1", 0);
337 if (r < 0)
338 return r;
339
340@@ -1094,7 +1094,7 @@ int cg_uninstall_release_agent(const char *controller) {
341 if (r < 0)
342 return r;
343
344- r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER);
345+ r = write_string_file(fs, "0", 0);
346 if (r < 0)
347 return r;
348
349@@ -1104,7 +1104,7 @@ int cg_uninstall_release_agent(const char *controller) {
350 if (r < 0)
351 return r;
352
353- r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER);
354+ r = write_string_file(fs, "", 0);
355 if (r < 0)
356 return r;
357
357diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c 358diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c
358index 805503f366..01a7ccb291 100644 359index 805503f366..3234a1d76e 100644
359--- a/src/shared/coredump-util.c 360--- a/src/shared/coredump-util.c
360+++ b/src/shared/coredump-util.c 361+++ b/src/shared/coredump-util.c
361@@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) {
362 xsprintf(t, "0x%"PRIx64, value);
363
364 return write_string_file("/proc/self/coredump_filter", t,
365- WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
366+ 0);
367 }
368
369 /* Turn off core dumps but only if we're running outside of a container. */
370@@ -173,7 +173,7 @@ void disable_coredumps(void) { 362@@ -173,7 +173,7 @@ void disable_coredumps(void) {
371 if (detect_container() > 0) 363 if (detect_container() > 0)
372 return; 364 return;
@@ -377,7 +369,7 @@ index 805503f366..01a7ccb291 100644
377 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); 369 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
378 } 370 }
379diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c 371diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c
380index 7c21157580..06ab74b04c 100644 372index 1213fdc2c7..4c26e6a4ee 100644
381--- a/src/shared/hibernate-util.c 373--- a/src/shared/hibernate-util.c
382+++ b/src/shared/hibernate-util.c 374+++ b/src/shared/hibernate-util.c
383@@ -495,7 +495,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { 375@@ -495,7 +495,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) {
@@ -399,7 +391,7 @@ index 7c21157580..06ab74b04c 100644
399 return log_error_errno(r, 391 return log_error_errno(r,
400 "Failed to write device '%s' (%s) to /sys/power/resume: %m", 392 "Failed to write device '%s' (%s) to /sys/power/resume: %m",
401diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c 393diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c
402index 1f88e724d0..feb18b320a 100644 394index d0a79b2635..0c82d9943a 100644
403--- a/src/shared/smack-util.c 395--- a/src/shared/smack-util.c
404+++ b/src/shared/smack-util.c 396+++ b/src/shared/smack-util.c
405@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { 397@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {
@@ -411,33 +403,11 @@ index 1f88e724d0..feb18b320a 100644
411 if (r < 0) 403 if (r < 0)
412 return r; 404 return r;
413 405
414diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
415index 810c5b5206..be0d127ff3 100644
416--- a/src/shared/watchdog.c
417+++ b/src/shared/watchdog.c
418@@ -93,7 +93,7 @@ static int watchdog_set_pretimeout_governor(const char *governor) {
419
420 r = write_string_file(sys_fn,
421 governor,
422- WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
423+ WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
424 if (r < 0)
425 return log_error_errno(r, "Failed to set watchdog pretimeout_governor to '%s': %m", governor);
426
427diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c 406diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
428index 0402bb07f3..a6cbb45340 100644 407index 181bb4ccef..2dbb3f4bc6 100644
429--- a/src/sleep/sleep.c 408--- a/src/sleep/sleep.c
430+++ b/src/sleep/sleep.c 409+++ b/src/sleep/sleep.c
431@@ -139,7 +139,7 @@ static int write_state(int fd, char * const *states) { 410@@ -158,7 +158,7 @@ static int write_mode(const char *path, char * const *modes) {
432 if (k < 0)
433 return RET_GATHER(r, k);
434
435- k = write_string_stream(f, *state, WRITE_STRING_FILE_DISABLE_BUFFER);
436+ k = write_string_stream(f, *state, 0);
437 if (k >= 0) {
438 log_debug("Using sleep state '%s'.", *state);
439 return 0;
440@@ -157,7 +157,7 @@ static int write_mode(const char *path, char * const *modes) {
441 assert(path); 411 assert(path);
442 412
443 STRV_FOREACH(mode, modes) { 413 STRV_FOREACH(mode, modes) {
@@ -447,10 +417,10 @@ index 0402bb07f3..a6cbb45340 100644
447 log_debug("Using sleep mode '%s' for %s.", *mode, path); 417 log_debug("Using sleep mode '%s' for %s.", *mode, path);
448 return 0; 418 return 0;
449diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c 419diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c
450index 1bb8eec316..cf9b4c4a21 100644 420index ca8e886d37..5c27c54f09 100644
451--- a/src/storagetm/storagetm.c 421--- a/src/storagetm/storagetm.c
452+++ b/src/storagetm/storagetm.c 422+++ b/src/storagetm/storagetm.c
453@@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) { 423@@ -197,7 +197,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) {
454 if (!enable_fn) 424 if (!enable_fn)
455 return log_oom(); 425 return log_oom();
456 426
@@ -459,7 +429,7 @@ index 1bb8eec316..cf9b4c4a21 100644
459 if (r < 0) 429 if (r < 0)
460 log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name); 430 log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name);
461 431
462@@ -254,7 +254,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { 432@@ -265,7 +265,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
463 _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */ 433 _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */
464 434
465 /* The default string stored in 'attr_model' is "Linux" btw. */ 435 /* The default string stored in 'attr_model' is "Linux" btw. */
@@ -468,7 +438,7 @@ index 1bb8eec316..cf9b4c4a21 100644
468 if (r < 0) 438 if (r < 0)
469 log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w); 439 log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w);
470 } 440 }
471@@ -268,7 +268,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { 441@@ -279,7 +279,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
472 return log_oom(); 442 return log_oom();
473 443
474 /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */ 444 /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */
@@ -477,7 +447,7 @@ index 1bb8eec316..cf9b4c4a21 100644
477 if (r < 0) 447 if (r < 0)
478 log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated); 448 log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated);
479 } 449 }
480@@ -295,7 +295,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) { 450@@ -306,7 +306,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
481 if (!truncated) 451 if (!truncated)
482 return log_oom(); 452 return log_oom();
483 453
@@ -486,7 +456,7 @@ index 1bb8eec316..cf9b4c4a21 100644
486 if (r < 0) 456 if (r < 0)
487 log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated); 457 log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated);
488 } 458 }
489@@ -345,7 +345,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co 459@@ -356,7 +356,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co
490 id = id128_digest(j, l); 460 id = id128_digest(j, l);
491 } 461 }
492 462
@@ -495,7 +465,7 @@ index 1bb8eec316..cf9b4c4a21 100644
495 if (r < 0) 465 if (r < 0)
496 log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id)); 466 log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id));
497 467
498@@ -408,7 +408,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi 468@@ -419,7 +419,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
499 if (subsystem_fd < 0) 469 if (subsystem_fd < 0)
500 return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j); 470 return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j);
501 471
@@ -504,7 +474,7 @@ index 1bb8eec316..cf9b4c4a21 100644
504 if (r < 0) 474 if (r < 0)
505 return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m"); 475 return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m");
506 476
507@@ -423,11 +423,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi 477@@ -434,11 +434,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
508 478
509 /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others 479 /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others
510 * via configfs, and by including the PID it's clear to who the stuff belongs. */ 480 * via configfs, and by including the PID it's clear to who the stuff belongs. */
@@ -518,7 +488,7 @@ index 1bb8eec316..cf9b4c4a21 100644
518 if (r < 0) 488 if (r < 0)
519 return log_error_errno(r, "Failed to write 'enable' attribute: %m"); 489 return log_error_errno(r, "Failed to write 'enable' attribute: %m");
520 490
521@@ -557,19 +557,19 @@ static int nvme_port_add_portnr( 491@@ -568,19 +568,19 @@ static int nvme_port_add_portnr(
522 return 0; 492 return 0;
523 } 493 }
524 494
@@ -542,18 +512,6 @@ index 1bb8eec316..cf9b4c4a21 100644
542 if (r < 0) 512 if (r < 0)
543 return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr); 513 return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr);
544 514
545diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
546index 581bbaf345..cdf648a2d1 100644
547--- a/src/udev/udev-rules.c
548+++ b/src/udev/udev-rules.c
549@@ -2706,7 +2706,6 @@ static int udev_rule_apply_token_to_event(
550 log_event_debug(dev, token, "Writing ATTR{'%s'}=\"%s\".", buf, value);
551 r = write_string_file(buf, value,
552 WRITE_STRING_FILE_VERIFY_ON_FAILURE |
553- WRITE_STRING_FILE_DISABLE_BUFFER |
554 WRITE_STRING_FILE_AVOID_NEWLINE |
555 WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
556 if (r < 0)
557diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c 515diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
558index ba742dda69..6f20e81615 100644 516index ba742dda69..6f20e81615 100644
559--- a/src/vconsole/vconsole-setup.c 517--- a/src/vconsole/vconsole-setup.c
@@ -568,5 +526,5 @@ index ba742dda69..6f20e81615 100644
568 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); 526 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
569 527
570-- 528--
5712.45.1 5292.34.1
572 530
diff --git a/meta/recipes-core/systemd/systemd/0015-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch
index 86003db4de..35009cba42 100644
--- a/meta/recipes-core/systemd/systemd/0015-Handle-__cpu_mask-usage.patch
+++ b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch
@@ -1,7 +1,7 @@
1From c1cbec8571855b8480d56dcad2ab81aea0782bd4 Mon Sep 17 00:00:00 2001 1From ab4fda874b26542de96720db58cb0e8704a40108 Mon Sep 17 00:00:00 2001
2From: Scott Murray <scott.murray@konsulko.com> 2From: Scott Murray <scott.murray@konsulko.com>
3Date: Fri, 13 Sep 2019 19:26:27 -0400 3Date: Fri, 13 Sep 2019 19:26:27 -0400
4Subject: [PATCH 15/27] Handle __cpu_mask usage 4Subject: [PATCH 13/26] Handle __cpu_mask usage
5 5
6Fixes errors: 6Fixes errors:
7 7
@@ -24,7 +24,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
24 2 files changed, 3 insertions(+), 1 deletion(-) 24 2 files changed, 3 insertions(+), 1 deletion(-)
25 25
26diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h 26diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h
27index 618fe1b0a3..46c92077b0 100644 27index 2c477d8a01..c026ce77a6 100644
28--- a/src/shared/cpu-set-util.h 28--- a/src/shared/cpu-set-util.h
29+++ b/src/shared/cpu-set-util.h 29+++ b/src/shared/cpu-set-util.h
30@@ -6,6 +6,8 @@ 30@@ -6,6 +6,8 @@
@@ -56,5 +56,5 @@ index ea0c58770e..b65c0bd370 100644
56 /* Print information about various types. Useful when diagnosing 56 /* Print information about various types. Useful when diagnosing
57 * gcc diagnostics on an unfamiliar architecture. */ 57 * gcc diagnostics on an unfamiliar architecture. */
58-- 58--
592.45.1 592.34.1
60 60
diff --git a/meta/recipes-core/systemd/systemd/0016-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch
index 6c7b233f95..08d4e384ff 100644
--- a/meta/recipes-core/systemd/systemd/0016-Handle-missing-gshadow.patch
+++ b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch
@@ -1,7 +1,7 @@
1From 8b540d8240bbc3f917de9ca8d3b62f28c3424d91 Mon Sep 17 00:00:00 2001 1From c5165f6adf8a9cfe8c0784c598b87d7d7e8b7d1a Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alex.kiernan@gmail.com> 2From: Alex Kiernan <alex.kiernan@gmail.com>
3Date: Tue, 10 Mar 2020 11:05:20 +0000 3Date: Tue, 10 Mar 2020 11:05:20 +0000
4Subject: [PATCH 16/27] Handle missing gshadow 4Subject: [PATCH 14/26] Handle missing gshadow
5 5
6gshadow usage is now present in the userdb code. Mask all uses of it to 6gshadow usage is now present in the userdb code. Mask all uses of it to
7allow compilation on musl 7allow compilation on musl
@@ -17,7 +17,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
17 3 files changed, 30 insertions(+), 1 deletion(-) 17 3 files changed, 30 insertions(+), 1 deletion(-)
18 18
19diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c 19diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
20index ffb5721466..4d01815c8c 100644 20index 9223a2e6ca..f9eb1a5b64 100644
21--- a/src/shared/user-record-nss.c 21--- a/src/shared/user-record-nss.c
22+++ b/src/shared/user-record-nss.c 22+++ b/src/shared/user-record-nss.c
23@@ -286,8 +286,10 @@ int nss_group_to_group_record( 23@@ -286,8 +286,10 @@ int nss_group_to_group_record(
@@ -45,9 +45,9 @@ index ffb5721466..4d01815c8c 100644
45 } 45 }
46+#endif 46+#endif
47 47
48 r = json_build(&g->json, JSON_BUILD_OBJECT( 48 r = sd_json_buildo(
49 JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), 49 &g->json,
50@@ -344,6 +348,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 50@@ -345,6 +349,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
51 assert(ret_sgrp); 51 assert(ret_sgrp);
52 assert(ret_buffer); 52 assert(ret_buffer);
53 53
@@ -55,7 +55,7 @@ index ffb5721466..4d01815c8c 100644
55 for (;;) { 55 for (;;) {
56 _cleanup_free_ char *buf = NULL; 56 _cleanup_free_ char *buf = NULL;
57 struct sgrp sgrp, *result; 57 struct sgrp sgrp, *result;
58@@ -372,6 +377,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re 58@@ -373,6 +378,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
59 buflen *= 2; 59 buflen *= 2;
60 buf = mfree(buf); 60 buf = mfree(buf);
61 } 61 }
@@ -65,7 +65,7 @@ index ffb5721466..4d01815c8c 100644
65 } 65 }
66 66
67 int nss_group_record_by_name( 67 int nss_group_record_by_name(
68@@ -382,7 +390,9 @@ int nss_group_record_by_name( 68@@ -383,7 +391,9 @@ int nss_group_record_by_name(
69 _cleanup_free_ char *sbuf = NULL; 69 _cleanup_free_ char *sbuf = NULL;
70 _cleanup_free_ struct group *result = NULL; 70 _cleanup_free_ struct group *result = NULL;
71 bool incomplete = false; 71 bool incomplete = false;
@@ -75,7 +75,7 @@ index ffb5721466..4d01815c8c 100644
75 int r; 75 int r;
76 76
77 assert(name); 77 assert(name);
78@@ -391,6 +401,7 @@ int nss_group_record_by_name( 78@@ -392,6 +402,7 @@ int nss_group_record_by_name(
79 if (r < 0) 79 if (r < 0)
80 return r; 80 return r;
81 81
@@ -83,7 +83,7 @@ index ffb5721466..4d01815c8c 100644
83 if (with_shadow) { 83 if (with_shadow) {
84 r = nss_sgrp_for_group(result, &sgrp, &sbuf); 84 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
85 if (r < 0) { 85 if (r < 0) {
86@@ -402,6 +413,9 @@ int nss_group_record_by_name( 86@@ -403,6 +414,9 @@ int nss_group_record_by_name(
87 incomplete = true; 87 incomplete = true;
88 88
89 r = nss_group_to_group_record(result, sresult, ret); 89 r = nss_group_to_group_record(result, sresult, ret);
@@ -93,7 +93,7 @@ index ffb5721466..4d01815c8c 100644
93 if (r < 0) 93 if (r < 0)
94 return r; 94 return r;
95 95
96@@ -418,13 +432,16 @@ int nss_group_record_by_gid( 96@@ -419,13 +433,16 @@ int nss_group_record_by_gid(
97 _cleanup_free_ char *sbuf = NULL; 97 _cleanup_free_ char *sbuf = NULL;
98 _cleanup_free_ struct group *result = NULL; 98 _cleanup_free_ struct group *result = NULL;
99 bool incomplete = false; 99 bool incomplete = false;
@@ -110,7 +110,7 @@ index ffb5721466..4d01815c8c 100644
110 if (with_shadow) { 110 if (with_shadow) {
111 r = nss_sgrp_for_group(result, &sgrp, &sbuf); 111 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
112 if (r < 0) { 112 if (r < 0) {
113@@ -436,6 +453,9 @@ int nss_group_record_by_gid( 113@@ -437,6 +454,9 @@ int nss_group_record_by_gid(
114 incomplete = true; 114 incomplete = true;
115 115
116 r = nss_group_to_group_record(result, sresult, ret); 116 r = nss_group_to_group_record(result, sresult, ret);
@@ -137,10 +137,10 @@ index 22ab04d6ee..4e52e7a911 100644
137 #include <shadow.h> 137 #include <shadow.h>
138 138
139diff --git a/src/shared/userdb.c b/src/shared/userdb.c 139diff --git a/src/shared/userdb.c b/src/shared/userdb.c
140index 75dece3442..5628e1410f 100644 140index ff83d4bf90..54d36cc706 100644
141--- a/src/shared/userdb.c 141--- a/src/shared/userdb.c
142+++ b/src/shared/userdb.c 142+++ b/src/shared/userdb.c
143@@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 143@@ -1041,13 +1041,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
144 if (gr) { 144 if (gr) {
145 _cleanup_free_ char *buffer = NULL; 145 _cleanup_free_ char *buffer = NULL;
146 bool incomplete = false; 146 bool incomplete = false;
@@ -157,7 +157,7 @@ index 75dece3442..5628e1410f 100644
157 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { 157 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
158 r = nss_sgrp_for_group(gr, &sgrp, &buffer); 158 r = nss_sgrp_for_group(gr, &sgrp, &buffer);
159 if (r < 0) { 159 if (r < 0) {
160@@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { 160@@ -1060,6 +1062,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
161 } 161 }
162 162
163 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); 163 r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);
@@ -168,5 +168,5 @@ index 75dece3442..5628e1410f 100644
168 return r; 168 return r;
169 169
170-- 170--
1712.45.1 1712.34.1
172 172
diff --git a/meta/recipes-core/systemd/systemd/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
index a7a641e0ad..f0aa3a0bd8 100644
--- a/meta/recipes-core/systemd/systemd/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
@@ -1,7 +1,7 @@
1From 45bb63a1727097683acad23f270968026671ec6a Mon Sep 17 00:00:00 2001 1From ef9ad83759f78de983d2d7c4f95bc48b83bb8f66 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 12 Apr 2021 23:44:53 -0700 3Date: Mon, 12 Apr 2021 23:44:53 -0700
4Subject: [PATCH 17/27] missing_syscall.h: Define MIPS ABI defines for musl 4Subject: [PATCH 15/26] missing_syscall.h: Define MIPS ABI defines for musl
5 5
6musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 6musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64
7unlike glibc where these are provided by libc headers, therefore define 7unlike glibc where these are provided by libc headers, therefore define
@@ -15,6 +15,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 src/shared/base-filesystem.c | 1 + 15 src/shared/base-filesystem.c | 1 +
16 2 files changed, 7 insertions(+) 16 2 files changed, 7 insertions(+)
17 17
18diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
19index e2cd8b4e35..f2fe489de7 100644
18--- a/src/basic/missing_syscall.h 20--- a/src/basic/missing_syscall.h
19+++ b/src/basic/missing_syscall.h 21+++ b/src/basic/missing_syscall.h
20@@ -20,6 +20,12 @@ 22@@ -20,6 +20,12 @@
@@ -30,6 +32,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
30 #include "macro.h" 32 #include "macro.h"
31 #include "missing_keyctl.h" 33 #include "missing_keyctl.h"
32 #include "missing_sched.h" 34 #include "missing_sched.h"
35diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
36index 389c77eee0..e3627c4603 100644
33--- a/src/shared/base-filesystem.c 37--- a/src/shared/base-filesystem.c
34+++ b/src/shared/base-filesystem.c 38+++ b/src/shared/base-filesystem.c
35@@ -20,6 +20,7 @@ 39@@ -20,6 +20,7 @@
@@ -40,3 +44,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
40 44
41 typedef struct BaseFilesystem { 45 typedef struct BaseFilesystem {
42 const char *dir; /* directory or symlink to create */ 46 const char *dir; /* directory or symlink to create */
47--
482.34.1
49
diff --git a/meta/recipes-core/systemd/systemd/0018-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch
index b4b6be0e75..b802106155 100644
--- a/meta/recipes-core/systemd/systemd/0018-pass-correct-parameters-to-getdents64.patch
+++ b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch
@@ -1,7 +1,7 @@
1From 78a59a540d425e677d5652d9b72d7b175e36f4dd Mon Sep 17 00:00:00 2001 1From 9079b158779a9c395c24f882f72a1c734795045d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 21 Jan 2022 15:15:11 -0800 3Date: Fri, 21 Jan 2022 15:15:11 -0800
4Subject: [PATCH 18/27] pass correct parameters to getdents64 4Subject: [PATCH 16/26] pass correct parameters to getdents64
5 5
6Fixes 6Fixes
7../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] 7../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types]
@@ -20,7 +20,7 @@ Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
20 1 file changed, 1 insertion(+), 1 deletion(-) 20 1 file changed, 1 insertion(+), 1 deletion(-)
21 21
22diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c 22diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c
23index 776733148b..d37419658c 100644 23index 378fd92b06..5b567b457d 100644
24--- a/src/basic/recurse-dir.c 24--- a/src/basic/recurse-dir.c
25+++ b/src/basic/recurse-dir.c 25+++ b/src/basic/recurse-dir.c
26@@ -56,7 +56,7 @@ int readdir_all(int dir_fd, 26@@ -56,7 +56,7 @@ int readdir_all(int dir_fd,
@@ -33,5 +33,5 @@ index 776733148b..d37419658c 100644
33 return -errno; 33 return -errno;
34 if (n == 0) 34 if (n == 0)
35-- 35--
362.45.1 362.34.1
37 37
diff --git a/meta/recipes-core/systemd/systemd/0019-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch
index 44eebe16b3..5a2bc3c552 100644
--- a/meta/recipes-core/systemd/systemd/0019-Adjust-for-musl-headers.patch
+++ b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch
@@ -1,7 +1,7 @@
1From 585e04673da62a8bf50e00fd6c1ae9ffc66c3b2f Mon Sep 17 00:00:00 2001 1From be9d8f221ab9d31c0df8b2b3e66172bb9bc0f71f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 21 Jan 2022 22:19:37 -0800 3Date: Fri, 21 Jan 2022 22:19:37 -0800
4Subject: [PATCH 19/27] Adjust for musl headers 4Subject: [PATCH 17/26] Adjust for musl headers
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
@@ -10,6 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
10[Rebased for v255.1] 10[Rebased for v255.1]
11Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 11Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
12--- 12---
13 src/basic/linux/ethtool.h | 3 ++-
13 src/libsystemd-network/sd-dhcp6-client.c | 2 +- 14 src/libsystemd-network/sd-dhcp6-client.c | 2 +-
14 src/network/netdev/bareudp.c | 2 +- 15 src/network/netdev/bareudp.c | 2 +-
15 src/network/netdev/batadv.c | 2 +- 16 src/network/netdev/batadv.c | 2 +-
@@ -43,11 +44,24 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
43 src/network/networkd-ndisc.c | 2 +- 44 src/network/networkd-ndisc.c | 2 +-
44 src/network/networkd-setlink.c | 2 +- 45 src/network/networkd-setlink.c | 2 +-
45 src/network/networkd-sysctl.c | 2 +- 46 src/network/networkd-sysctl.c | 2 +-
46 src/shared/linux/ethtool.h | 3 ++-
47 src/shared/netif-util.c | 2 +- 47 src/shared/netif-util.c | 2 +-
48 src/udev/udev-builtin-net_id.c | 2 +- 48 src/udev/udev-builtin-net_id.c | 2 +-
49 36 files changed, 40 insertions(+), 36 deletions(-) 49 36 files changed, 40 insertions(+), 36 deletions(-)
50 50
51diff --git a/src/basic/linux/ethtool.h b/src/basic/linux/ethtool.h
52index a32293ba20..2aad67e9c0 100644
53--- a/src/basic/linux/ethtool.h
54+++ b/src/basic/linux/ethtool.h
55@@ -16,7 +16,8 @@
56
57 #include <linux/const.h>
58 #include <linux/types.h>
59-#include <linux/if_ether.h>
60+#include <netinet/if_ether.h>
61+//#include <linux/if_ether.h>
62
63 #include <limits.h> /* for INT_MAX */
64
51diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c 65diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
52index 3e992d7cad..c7e1ff4dbf 100644 66index 3e992d7cad..c7e1ff4dbf 100644
53--- a/src/libsystemd-network/sd-dhcp6-client.c 67--- a/src/libsystemd-network/sd-dhcp6-client.c
@@ -62,7 +76,7 @@ index 3e992d7cad..c7e1ff4dbf 100644
62 76
63 #include "sd-dhcp6-client.h" 77 #include "sd-dhcp6-client.h"
64diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c 78diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c
65index 1df886573b..c8b6714726 100644 79index e122abd97f..c120c2969b 100644
66--- a/src/network/netdev/bareudp.c 80--- a/src/network/netdev/bareudp.c
67+++ b/src/network/netdev/bareudp.c 81+++ b/src/network/netdev/bareudp.c
68@@ -2,7 +2,7 @@ 82@@ -2,7 +2,7 @@
@@ -75,7 +89,7 @@ index 1df886573b..c8b6714726 100644
75 #include "bareudp.h" 89 #include "bareudp.h"
76 #include "netlink-util.h" 90 #include "netlink-util.h"
77diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c 91diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c
78index 26da0231d4..2e8002af8c 100644 92index 9806d8eb7c..19c3d881c2 100644
79--- a/src/network/netdev/batadv.c 93--- a/src/network/netdev/batadv.c
80+++ b/src/network/netdev/batadv.c 94+++ b/src/network/netdev/batadv.c
81@@ -3,7 +3,7 @@ 95@@ -3,7 +3,7 @@
@@ -88,7 +102,7 @@ index 26da0231d4..2e8002af8c 100644
88 #include "batadv.h" 102 #include "batadv.h"
89 #include "fileio.h" 103 #include "fileio.h"
90diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c 104diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
91index 52a7f126b6..74ca0812db 100644 105index b866940b7a..a0eaf0a866 100644
92--- a/src/network/netdev/bond.c 106--- a/src/network/netdev/bond.c
93+++ b/src/network/netdev/bond.c 107+++ b/src/network/netdev/bond.c
94@@ -1,7 +1,7 @@ 108@@ -1,7 +1,7 @@
@@ -101,7 +115,7 @@ index 52a7f126b6..74ca0812db 100644
101 #include "alloc-util.h" 115 #include "alloc-util.h"
102 #include "bond.h" 116 #include "bond.h"
103diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c 117diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
104index d426c0c501..14432adb95 100644 118index d3ba4989d9..4f7301c4f1 100644
105--- a/src/network/netdev/bridge.c 119--- a/src/network/netdev/bridge.c
106+++ b/src/network/netdev/bridge.c 120+++ b/src/network/netdev/bridge.c
107@@ -2,7 +2,8 @@ 121@@ -2,7 +2,8 @@
@@ -115,7 +129,7 @@ index d426c0c501..14432adb95 100644
115 #include <netinet/in.h> 129 #include <netinet/in.h>
116 130
117diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c 131diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c
118index 00df1d2787..77b506b422 100644 132index 8b2893d5b4..412123f036 100644
119--- a/src/network/netdev/dummy.c 133--- a/src/network/netdev/dummy.c
120+++ b/src/network/netdev/dummy.c 134+++ b/src/network/netdev/dummy.c
121@@ -1,6 +1,6 @@ 135@@ -1,6 +1,6 @@
@@ -127,7 +141,7 @@ index 00df1d2787..77b506b422 100644
127 #include "dummy.h" 141 #include "dummy.h"
128 142
129diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c 143diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
130index 22c2b00e1b..1d762c4911 100644 144index 1d68be9bc8..539151c49e 100644
131--- a/src/network/netdev/geneve.c 145--- a/src/network/netdev/geneve.c
132+++ b/src/network/netdev/geneve.c 146+++ b/src/network/netdev/geneve.c
133@@ -2,7 +2,7 @@ 147@@ -2,7 +2,7 @@
@@ -153,7 +167,7 @@ index d7ff44cb9e..e037629ae4 100644
153 #include "ifb.h" 167 #include "ifb.h"
154 168
155diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c 169diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c
156index d5fe299b7b..c9c8002eac 100644 170index 6932c62e2a..fc458da9e8 100644
157--- a/src/network/netdev/ipoib.c 171--- a/src/network/netdev/ipoib.c
158+++ b/src/network/netdev/ipoib.c 172+++ b/src/network/netdev/ipoib.c
159@@ -1,6 +1,6 @@ 173@@ -1,6 +1,6 @@
@@ -165,7 +179,7 @@ index d5fe299b7b..c9c8002eac 100644
165 179
166 #include "ipoib.h" 180 #include "ipoib.h"
167diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c 181diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c
168index 51ae64341d..46460efabd 100644 182index 6e50f72aaa..49acfee25e 100644
169--- a/src/network/netdev/ipvlan.c 183--- a/src/network/netdev/ipvlan.c
170+++ b/src/network/netdev/ipvlan.c 184+++ b/src/network/netdev/ipvlan.c
171@@ -3,7 +3,7 @@ 185@@ -3,7 +3,7 @@
@@ -178,7 +192,7 @@ index 51ae64341d..46460efabd 100644
178 #include "conf-parser.h" 192 #include "conf-parser.h"
179 #include "ipvlan.h" 193 #include "ipvlan.h"
180diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c 194diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
181index 4b9f19cc95..6c4951a7e6 100644 195index 6dd434f803..f9fbe9f51a 100644
182--- a/src/network/netdev/macsec.c 196--- a/src/network/netdev/macsec.c
183+++ b/src/network/netdev/macsec.c 197+++ b/src/network/netdev/macsec.c
184@@ -1,7 +1,7 @@ 198@@ -1,7 +1,7 @@
@@ -191,7 +205,7 @@ index 4b9f19cc95..6c4951a7e6 100644
191 #include <linux/if_macsec.h> 205 #include <linux/if_macsec.h>
192 #include <linux/genetlink.h> 206 #include <linux/genetlink.h>
193diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c 207diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c
194index 21933d3970..a4ace19dc6 100644 208index fd112b58e1..b038740bda 100644
195--- a/src/network/netdev/macvlan.c 209--- a/src/network/netdev/macvlan.c
196+++ b/src/network/netdev/macvlan.c 210+++ b/src/network/netdev/macvlan.c
197@@ -3,7 +3,7 @@ 211@@ -3,7 +3,7 @@
@@ -204,7 +218,7 @@ index 21933d3970..a4ace19dc6 100644
204 #include "conf-parser.h" 218 #include "conf-parser.h"
205 #include "macvlan.h" 219 #include "macvlan.h"
206diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c 220diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
207index 2b411425ba..fe00200135 100644 221index c2986aafb5..147f1c95d0 100644
208--- a/src/network/netdev/netdev.c 222--- a/src/network/netdev/netdev.c
209+++ b/src/network/netdev/netdev.c 223+++ b/src/network/netdev/netdev.c
210@@ -3,7 +3,7 @@ 224@@ -3,7 +3,7 @@
@@ -217,7 +231,7 @@ index 2b411425ba..fe00200135 100644
217 231
218 #include "alloc-util.h" 232 #include "alloc-util.h"
219diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c 233diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c
220index 15d5c132f9..a3ffa48b15 100644 234index 59958c3bbe..61169016b0 100644
221--- a/src/network/netdev/netdevsim.c 235--- a/src/network/netdev/netdevsim.c
222+++ b/src/network/netdev/netdevsim.c 236+++ b/src/network/netdev/netdevsim.c
223@@ -1,6 +1,6 @@ 237@@ -1,6 +1,6 @@
@@ -241,7 +255,7 @@ index ff372092e6..eef66811f4 100644
241 #include "nlmon.h" 255 #include "nlmon.h"
242 256
243diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c 257diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c
244index db84e7cf6e..93d5642962 100644 258index af05cfda81..f659bed3a6 100644
245--- a/src/network/netdev/tunnel.c 259--- a/src/network/netdev/tunnel.c
246+++ b/src/network/netdev/tunnel.c 260+++ b/src/network/netdev/tunnel.c
247@@ -2,7 +2,7 @@ 261@@ -2,7 +2,7 @@
@@ -266,7 +280,7 @@ index 380547ee1e..137c1adf8a 100644
266 #include "vcan.h" 280 #include "vcan.h"
267 281
268diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c 282diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c
269index 78555286d1..e7eff072e4 100644 283index 54d3b59734..f3f75e22b5 100644
270--- a/src/network/netdev/veth.c 284--- a/src/network/netdev/veth.c
271+++ b/src/network/netdev/veth.c 285+++ b/src/network/netdev/veth.c
272@@ -3,7 +3,7 @@ 286@@ -3,7 +3,7 @@
@@ -292,7 +306,7 @@ index 60e49a5b8a..266fd58813 100644
292 306
293 #include "parse-util.h" 307 #include "parse-util.h"
294diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c 308diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c
295index 24079a7203..33ff17ea82 100644 309index c35419f859..4d1d3ef141 100644
296--- a/src/network/netdev/vrf.c 310--- a/src/network/netdev/vrf.c
297+++ b/src/network/netdev/vrf.c 311+++ b/src/network/netdev/vrf.c
298@@ -2,8 +2,8 @@ 312@@ -2,8 +2,8 @@
@@ -306,7 +320,7 @@ index 24079a7203..33ff17ea82 100644
306 #include "vrf.h" 320 #include "vrf.h"
307 321
308diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c 322diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c
309index c0343f45b6..f9e718f40b 100644 323index 2de89b8e24..ce1b8f9b69 100644
310--- a/src/network/netdev/vxcan.c 324--- a/src/network/netdev/vxcan.c
311+++ b/src/network/netdev/vxcan.c 325+++ b/src/network/netdev/vxcan.c
312@@ -1,7 +1,7 @@ 326@@ -1,7 +1,7 @@
@@ -319,7 +333,7 @@ index c0343f45b6..f9e718f40b 100644
319 #include "vxcan.h" 333 #include "vxcan.h"
320 334
321diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c 335diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c
322index 37f65967a6..bdd8848a02 100644 336index d8a066370d..8f94eeb763 100644
323--- a/src/network/netdev/vxlan.c 337--- a/src/network/netdev/vxlan.c
324+++ b/src/network/netdev/vxlan.c 338+++ b/src/network/netdev/vxlan.c
325@@ -3,7 +3,7 @@ 339@@ -3,7 +3,7 @@
@@ -332,7 +346,7 @@ index 37f65967a6..bdd8848a02 100644
332 #include "conf-parser.h" 346 #include "conf-parser.h"
333 #include "alloc-util.h" 347 #include "alloc-util.h"
334diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c 348diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
335index fed1be8d11..94b659fd23 100644 349index 8d1dddf828..5182783f45 100644
336--- a/src/network/netdev/wireguard.c 350--- a/src/network/netdev/wireguard.c
337+++ b/src/network/netdev/wireguard.c 351+++ b/src/network/netdev/wireguard.c
338@@ -5,7 +5,7 @@ 352@@ -5,7 +5,7 @@
@@ -357,7 +371,7 @@ index 905bfc0bdf..39e34dbb3b 100644
357 #include "missing_network.h" 371 #include "missing_network.h"
358 #include "xfrm.h" 372 #include "xfrm.h"
359diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c 373diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
360index 9f0268d934..8cd605ab4a 100644 374index 8b64dfe8f0..caa2885728 100644
361--- a/src/network/networkd-dhcp-common.c 375--- a/src/network/networkd-dhcp-common.c
362+++ b/src/network/networkd-dhcp-common.c 376+++ b/src/network/networkd-dhcp-common.c
363@@ -1,7 +1,8 @@ 377@@ -1,7 +1,8 @@
@@ -371,7 +385,7 @@ index 9f0268d934..8cd605ab4a 100644
371 #include "bus-error.h" 385 #include "bus-error.h"
372 #include "bus-locator.h" 386 #include "bus-locator.h"
373diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c 387diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c
374index 2e660b7763..b8dd6240a0 100644 388index 16426de981..3d8efc05f1 100644
375--- a/src/network/networkd-dhcp-prefix-delegation.c 389--- a/src/network/networkd-dhcp-prefix-delegation.c
376+++ b/src/network/networkd-dhcp-prefix-delegation.c 390+++ b/src/network/networkd-dhcp-prefix-delegation.c
377@@ -1,6 +1,5 @@ 391@@ -1,6 +1,5 @@
@@ -381,7 +395,7 @@ index 2e660b7763..b8dd6240a0 100644
381 395
382 #include "dhcp6-lease-internal.h" 396 #include "dhcp6-lease-internal.h"
383 #include "hashmap.h" 397 #include "hashmap.h"
384@@ -20,6 +19,8 @@ 398@@ -21,6 +20,8 @@
385 #include "strv.h" 399 #include "strv.h"
386 #include "tunnel.h" 400 #include "tunnel.h"
387 401
@@ -404,7 +418,7 @@ index c35102af74..3be469ae16 100644
404 418
405 #include "sd-dhcp-server.h" 419 #include "sd-dhcp-server.h"
406diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c 420diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
407index 4dd6044b18..15a598f9db 100644 421index d94ac1a213..b8fe82cb6a 100644
408--- a/src/network/networkd-dhcp4.c 422--- a/src/network/networkd-dhcp4.c
409+++ b/src/network/networkd-dhcp4.c 423+++ b/src/network/networkd-dhcp4.c
410@@ -3,7 +3,7 @@ 424@@ -3,7 +3,7 @@
@@ -415,9 +429,9 @@ index 4dd6044b18..15a598f9db 100644
415+//#include <linux/if_arp.h> 429+//#include <linux/if_arp.h>
416 430
417 #include "alloc-util.h" 431 #include "alloc-util.h"
418 #include "dhcp-client-internal.h" 432 #include "device-private.h"
419diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c 433diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
420index 32229a3fc7..662a345d6e 100644 434index 04f51ab530..c4580754f7 100644
421--- a/src/network/networkd-ipv6ll.c 435--- a/src/network/networkd-ipv6ll.c
422+++ b/src/network/networkd-ipv6ll.c 436+++ b/src/network/networkd-ipv6ll.c
423@@ -1,7 +1,7 @@ 437@@ -1,7 +1,7 @@
@@ -430,7 +444,7 @@ index 32229a3fc7..662a345d6e 100644
430 #include "in-addr-util.h" 444 #include "in-addr-util.h"
431 #include "networkd-address.h" 445 #include "networkd-address.h"
432diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c 446diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
433index 6b0f09926a..81f44f6e6a 100644 447index 3c042e6c18..05fe2cb900 100644
434--- a/src/network/networkd-link.c 448--- a/src/network/networkd-link.c
435+++ b/src/network/networkd-link.c 449+++ b/src/network/networkd-link.c
436@@ -4,7 +4,7 @@ 450@@ -4,7 +4,7 @@
@@ -443,7 +457,7 @@ index 6b0f09926a..81f44f6e6a 100644
443 #include <linux/netdevice.h> 457 #include <linux/netdevice.h>
444 #include <sys/socket.h> 458 #include <sys/socket.h>
445diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c 459diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
446index 7cafe1f6a3..07c293c9a6 100644 460index 33e86fb04e..51292871fc 100644
447--- a/src/network/networkd-ndisc.c 461--- a/src/network/networkd-ndisc.c
448+++ b/src/network/networkd-ndisc.c 462+++ b/src/network/networkd-ndisc.c
449@@ -6,7 +6,7 @@ 463@@ -6,7 +6,7 @@
@@ -456,7 +470,7 @@ index 7cafe1f6a3..07c293c9a6 100644
456 #include "sd-ndisc.h" 470 #include "sd-ndisc.h"
457 471
458diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c 472diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
459index 058bc00ba1..bb0a430a0b 100644 473index 8519e6e7a0..7aca2bbecc 100644
460--- a/src/network/networkd-setlink.c 474--- a/src/network/networkd-setlink.c
461+++ b/src/network/networkd-setlink.c 475+++ b/src/network/networkd-setlink.c
462@@ -2,7 +2,7 @@ 476@@ -2,7 +2,7 @@
@@ -466,10 +480,10 @@ index 058bc00ba1..bb0a430a0b 100644
466-#include <linux/if_arp.h> 480-#include <linux/if_arp.h>
467+//#include <linux/if_arp.h> 481+//#include <linux/if_arp.h>
468 #include <linux/if_bridge.h> 482 #include <linux/if_bridge.h>
483 #include <linux/ipv6.h>
469 484
470 #include "missing_network.h"
471diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c 485diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c
472index 68c23e0eb7..e177c49d9b 100644 486index 10a35bc44b..84c6b68ee4 100644
473--- a/src/network/networkd-sysctl.c 487--- a/src/network/networkd-sysctl.c
474+++ b/src/network/networkd-sysctl.c 488+++ b/src/network/networkd-sysctl.c
475@@ -2,7 +2,7 @@ 489@@ -2,7 +2,7 @@
@@ -479,24 +493,10 @@ index 68c23e0eb7..e177c49d9b 100644
479-#include <linux/if_arp.h> 493-#include <linux/if_arp.h>
480+//#include <linux/if_arp.h> 494+//#include <linux/if_arp.h>
481 495
482 #include "af-list.h" 496 #include "sd-messages.h"
483 #include "missing_network.h"
484diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
485index 3d1da515c0..3fca9a4faf 100644
486--- a/src/shared/linux/ethtool.h
487+++ b/src/shared/linux/ethtool.h
488@@ -16,7 +16,8 @@
489
490 #include <linux/const.h>
491 #include <linux/types.h>
492-#include <linux/if_ether.h>
493+#include <netinet/if_ether.h>
494+//#include <linux/if_ether.h>
495
496 #include <limits.h> /* for INT_MAX */
497 497
498diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c 498diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
499index 8adc2c89c8..1977e28d7f 100644 499index 978ce42341..899b5f613f 100644
500--- a/src/shared/netif-util.c 500--- a/src/shared/netif-util.c
501+++ b/src/shared/netif-util.c 501+++ b/src/shared/netif-util.c
502@@ -1,7 +1,7 @@ 502@@ -1,7 +1,7 @@
@@ -509,7 +509,7 @@ index 8adc2c89c8..1977e28d7f 100644
509 #include "arphrd-util.h" 509 #include "arphrd-util.h"
510 #include "device-util.h" 510 #include "device-util.h"
511diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c 511diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
512index 384a1f31cb..c94bb70afb 100644 512index 09c04b9a7f..4686897dbf 100644
513--- a/src/udev/udev-builtin-net_id.c 513--- a/src/udev/udev-builtin-net_id.c
514+++ b/src/udev/udev-builtin-net_id.c 514+++ b/src/udev/udev-builtin-net_id.c
515@@ -19,7 +19,7 @@ 515@@ -19,7 +19,7 @@
@@ -522,5 +522,5 @@ index 384a1f31cb..c94bb70afb 100644
522 #include <linux/pci_regs.h> 522 #include <linux/pci_regs.h>
523 523
524-- 524--
5252.45.1 5252.34.1
526 526
diff --git a/meta/recipes-core/systemd/systemd/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
index b3fbfee08d..a92b8cc80f 100644
--- a/meta/recipes-core/systemd/systemd/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
+++ b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
@@ -1,7 +1,7 @@
1From e01f0c444423eb65d176713735ff8cefb3068f3d Mon Sep 17 00:00:00 2001 1From 349f9a0f9ecfc6575a3d9eeaffe89536e6a43914 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Nov 2022 13:31:34 -0800 3Date: Tue, 8 Nov 2022 13:31:34 -0800
4Subject: [PATCH 20/27] test-bus-error: strerror() is assumed to be GNU 4Subject: [PATCH 18/26] test-bus-error: strerror() is assumed to be GNU
5 specific version mark it so 5 specific version mark it so
6 6
7Upstream-Status: Inappropriate [Upstream systemd only supports glibc] 7Upstream-Status: Inappropriate [Upstream systemd only supports glibc]
@@ -48,5 +48,5 @@ index ab463bd1b3..e2ebcaaf33 100644
48 TEST(PROTECT_ERRNO) { 48 TEST(PROTECT_ERRNO) {
49 errno = 12; 49 errno = 12;
50-- 50--
512.45.1 512.34.1
52 52
diff --git a/meta/recipes-core/systemd/systemd/0021-errno-util-Make-STRERROR-portable-for-musl.patch b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch
index 6e899d0905..791079a19f 100644
--- a/meta/recipes-core/systemd/systemd/0021-errno-util-Make-STRERROR-portable-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch
@@ -1,7 +1,7 @@
1From d2f632dd6a8cca0fbdd6568ce84004335c004f58 Mon Sep 17 00:00:00 2001 1From 28fa1d5f56c6ddee9e336e6f2051c55e9f2f98b4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 23 Jan 2023 23:39:46 -0800 3Date: Mon, 23 Jan 2023 23:39:46 -0800
4Subject: [PATCH 21/27] errno-util: Make STRERROR portable for musl 4Subject: [PATCH 19/26] errno-util: Make STRERROR portable for musl
5 5
6Sadly, systemd has decided to use yet another GNU extention in a macro 6Sadly, systemd has decided to use yet another GNU extention in a macro
7lets make this such that we can use XSI compliant strerror_r() for 7lets make this such that we can use XSI compliant strerror_r() for
@@ -38,5 +38,5 @@ index 48b76e4bf7..6e7653e2d9 100644
38 * Note that we can't use ({ … }) to define a temporary variable, so errnum is 38 * Note that we can't use ({ … }) to define a temporary variable, so errnum is
39 * evaluated twice. */ 39 * evaluated twice. */
40-- 40--
412.45.1 412.34.1
42 42
diff --git a/meta/recipes-core/systemd/systemd/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch
index ed7e3ea586..16df44cd86 100644
--- a/meta/recipes-core/systemd/systemd/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch
+++ b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch
@@ -1,7 +1,7 @@
1From 4a3ed5aaaf108d3a07f24997698906e801ba2412 Mon Sep 17 00:00:00 2001 1From 66de8a53849f76f5596327c38ae5f002b9f534cd Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 2 Aug 2023 12:06:27 -0700 3Date: Wed, 2 Aug 2023 12:06:27 -0700
4Subject: [PATCH 22/27] sd-event: Make malloc_trim() conditional on glibc 4Subject: [PATCH 20/26] sd-event: Make malloc_trim() conditional on glibc
5 5
6musl does not have this API 6musl does not have this API
7 7
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 1 file changed, 3 insertions(+), 1 deletion(-) 12 1 file changed, 3 insertions(+), 1 deletion(-)
13 13
14diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c 14diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
15index a1305ef014..b8a73da2a3 100644 15index 7aea7d2581..d3f4001f53 100644
16--- a/src/libsystemd/sd-event/sd-event.c 16--- a/src/libsystemd/sd-event/sd-event.c
17+++ b/src/libsystemd/sd-event/sd-event.c 17+++ b/src/libsystemd/sd-event/sd-event.c
18@@ -1877,7 +1877,7 @@ _public_ int sd_event_add_exit( 18@@ -1881,7 +1881,7 @@ _public_ int sd_event_add_exit(
19 } 19 }
20 20
21 _public_ int sd_event_trim_memory(void) { 21 _public_ int sd_event_trim_memory(void) {
@@ -24,7 +24,7 @@ index a1305ef014..b8a73da2a3 100644
24 24
25 /* A default implementation of a memory pressure callback. Simply releases our own allocation caches 25 /* A default implementation of a memory pressure callback. Simply releases our own allocation caches
26 * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a 26 * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a
27@@ -1891,7 +1891,9 @@ _public_ int sd_event_trim_memory(void) { 27@@ -1895,7 +1895,9 @@ _public_ int sd_event_trim_memory(void) {
28 28
29 usec_t before_timestamp = now(CLOCK_MONOTONIC); 29 usec_t before_timestamp = now(CLOCK_MONOTONIC);
30 hashmap_trim_pools(); 30 hashmap_trim_pools();
@@ -35,5 +35,5 @@ index a1305ef014..b8a73da2a3 100644
35 35
36 if (r > 0) 36 if (r > 0)
37-- 37--
382.45.1 382.34.1
39 39
diff --git a/meta/recipes-core/systemd/systemd/0023-shared-Do-not-use-malloc_info-on-musl.patch b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch
index b8583c7af7..7ab56ef8fb 100644
--- a/meta/recipes-core/systemd/systemd/0023-shared-Do-not-use-malloc_info-on-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch
@@ -1,7 +1,7 @@
1From d3880d167d8dfafbb8ee62f7737a869f9525f303 Mon Sep 17 00:00:00 2001 1From 93d13363c605fb2de484f38f3726f8fbad1c3540 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 2 Aug 2023 12:20:40 -0700 3Date: Wed, 2 Aug 2023 12:20:40 -0700
4Subject: [PATCH 23/27] shared: Do not use malloc_info on musl 4Subject: [PATCH 21/26] shared: Do not use malloc_info on musl
5 5
6Upstream-Status: Inappropriate [musl-specific] 6Upstream-Status: Inappropriate [musl-specific]
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
@@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 2 files changed, 5 insertions(+), 4 deletions(-) 11 2 files changed, 5 insertions(+), 4 deletions(-)
12 12
13diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c 13diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
14index 30f9602b1e..5308f168db 100644 14index ff80e580fc..a628a29d0c 100644
15--- a/src/shared/bus-util.c 15--- a/src/shared/bus-util.c
16+++ b/src/shared/bus-util.c 16+++ b/src/shared/bus-util.c
17@@ -755,15 +755,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat 17@@ -787,15 +787,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat
18 _cleanup_close_ int fd = -EBADF; 18 _cleanup_close_ int fd = -EBADF;
19 size_t dump_size; 19 size_t dump_size;
20 FILE *f; 20 FILE *f;
@@ -53,5 +53,5 @@ index 8e70e365dd..9e782caec9 100644
53 break; 53 break;
54 } 54 }
55-- 55--
562.45.1 562.34.1
57 57
diff --git a/meta/recipes-core/systemd/systemd/0024-avoid-missing-LOCK_EX-declaration.patch b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch
index 6804c7c62e..d06967f8d5 100644
--- a/meta/recipes-core/systemd/systemd/0024-avoid-missing-LOCK_EX-declaration.patch
+++ b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch
@@ -1,7 +1,7 @@
1From ca2a736627f8ee8dd9dbbf5b3149d4c8493833ff Mon Sep 17 00:00:00 2001 1From 5b8df64993b68a5a4af0f214d8cae77f4e716593 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 2 Jan 2024 11:03:27 +0800 3Date: Tue, 2 Jan 2024 11:03:27 +0800
4Subject: [PATCH 24/27] avoid missing LOCK_EX declaration 4Subject: [PATCH 22/26] avoid missing LOCK_EX declaration
5 5
6This only happens on MUSL. Include sys/file.h to avoid compilation 6This only happens on MUSL. Include sys/file.h to avoid compilation
7error about missing LOCK_EX declaration. 7error about missing LOCK_EX declaration.
@@ -16,7 +16,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
16 3 files changed, 3 insertions(+) 16 3 files changed, 3 insertions(+)
17 17
18diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h 18diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
19index af17481dd8..fa20bfa30f 100644 19index 93b254c680..5f0b1a816d 100644
20--- a/src/basic/fd-util.h 20--- a/src/basic/fd-util.h
21+++ b/src/basic/fd-util.h 21+++ b/src/basic/fd-util.h
22@@ -6,6 +6,7 @@ 22@@ -6,6 +6,7 @@
@@ -28,10 +28,10 @@ index af17481dd8..fa20bfa30f 100644
28 #include "macro.h" 28 #include "macro.h"
29 #include "missing_fcntl.h" 29 #include "missing_fcntl.h"
30diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c 30diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
31index ee8db04e76..2aff654f0f 100644 31index 9d636f5529..6be43caa57 100644
32--- a/src/core/exec-invoke.c 32--- a/src/core/exec-invoke.c
33+++ b/src/core/exec-invoke.c 33+++ b/src/core/exec-invoke.c
34@@ -4,6 +4,7 @@ 34@@ -5,6 +5,7 @@
35 #include <sys/ioctl.h> 35 #include <sys/ioctl.h>
36 #include <sys/mount.h> 36 #include <sys/mount.h>
37 #include <sys/prctl.h> 37 #include <sys/prctl.h>
@@ -40,7 +40,7 @@ index ee8db04e76..2aff654f0f 100644
40 #if HAVE_PAM 40 #if HAVE_PAM
41 #include <security/pam_appl.h> 41 #include <security/pam_appl.h>
42diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h 42diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h
43index 5339bc4e5e..0697495f23 100644 43index 92ba6cf764..ba01a0ae55 100644
44--- a/src/shared/dev-setup.h 44--- a/src/shared/dev-setup.h
45+++ b/src/shared/dev-setup.h 45+++ b/src/shared/dev-setup.h
46@@ -2,6 +2,7 @@ 46@@ -2,6 +2,7 @@
@@ -49,8 +49,8 @@ index 5339bc4e5e..0697495f23 100644
49 #include <sys/types.h> 49 #include <sys/types.h>
50+#include <sys/file.h> 50+#include <sys/file.h>
51 51
52 int lock_dev_console(void); 52 int dev_setup(const char *prefix, uid_t uid, gid_t gid);
53 53
54-- 54--
552.45.1 552.34.1
56 56
diff --git a/meta/recipes-core/systemd/systemd/0025-include-signal.h-to-avoid-the-undeclared-error.patch b/meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch
index 5cfb112d67..c8bcd9e355 100644
--- a/meta/recipes-core/systemd/systemd/0025-include-signal.h-to-avoid-the-undeclared-error.patch
+++ b/meta/recipes-core/systemd/systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch
@@ -1,7 +1,7 @@
1From ecf124ab2e488a71741fe443ff4863f7ed172968 Mon Sep 17 00:00:00 2001 1From e39afec7e5a2f3a9de7202affab4d0340ba879d7 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 2 Jul 2024 22:18:47 -0700 3Date: Tue, 2 Jul 2024 22:18:47 -0700
4Subject: [PATCH 25/27] include signal.h to avoid the 'undeclared' error 4Subject: [PATCH 23/26] include signal.h to avoid the 'undeclared' error
5 5
6Upstream-Status: Inappropriate [musl specific] 6Upstream-Status: Inappropriate [musl specific]
7 7
@@ -11,17 +11,17 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11 1 file changed, 1 insertion(+) 11 1 file changed, 1 insertion(+)
12 12
13diff --git a/src/basic/pidref.h b/src/basic/pidref.h 13diff --git a/src/basic/pidref.h b/src/basic/pidref.h
14index 9920ebb9b3..2fdd4ff50f 100644 14index 42ddf4e50b..b9cf53680f 100644
15--- a/src/basic/pidref.h 15--- a/src/basic/pidref.h
16+++ b/src/basic/pidref.h 16+++ b/src/basic/pidref.h
17@@ -1,6 +1,7 @@ 17@@ -3,6 +3,7 @@
18 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 18
19 #pragma once 19 typedef struct PidRef PidRef;
20 20
21+#include <signal.h> 21+#include <signal.h>
22 #include "macro.h" 22 #include "macro.h"
23 #include "process-util.h"
23 24
24 /* An embeddable structure carrying a reference to a process. Supposed to be used when tracking processes continuously. */
25-- 25--
262.45.1 262.34.1
27 27
diff --git a/meta/recipes-core/systemd/systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch b/meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
index ca1a525a0a..9532e6b9af 100644
--- a/meta/recipes-core/systemd/systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
+++ b/meta/recipes-core/systemd/systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
@@ -1,7 +1,7 @@
1From 787606c6ff822fb3fe41ba951ee289bbf6d4def3 Mon Sep 17 00:00:00 2001 1From 5a4334fde21b896cd75b2d1a56e06a4f365e9c4d Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 2 Jul 2024 22:44:31 -0700 3Date: Tue, 2 Jul 2024 22:44:31 -0700
4Subject: [PATCH 26/27] undef stdin for references using stdin as a struct 4Subject: [PATCH 24/26] undef stdin for references using stdin as a struct
5 member 5 member
6 6
7In musl stdio.h, we have: 7In musl stdio.h, we have:
@@ -18,7 +18,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18 2 files changed, 4 insertions(+) 18 2 files changed, 4 insertions(+)
19 19
20diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c 20diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c
21index cfb2828f4e..1794a7b269 100644 21index e37609c2e1..1b212ae7b4 100644
22--- a/src/shared/edit-util.c 22--- a/src/shared/edit-util.c
23+++ b/src/shared/edit-util.c 23+++ b/src/shared/edit-util.c
24@@ -3,6 +3,8 @@ 24@@ -3,6 +3,8 @@
@@ -31,7 +31,7 @@ index cfb2828f4e..1794a7b269 100644
31 #include "copy.h" 31 #include "copy.h"
32 #include "edit-util.h" 32 #include "edit-util.h"
33diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c 33diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
34index 15398f8364..e7d53ca9a1 100644 34index c42a31153d..7695ceeead 100644
35--- a/src/systemctl/systemctl-edit.c 35--- a/src/systemctl/systemctl-edit.c
36+++ b/src/systemctl/systemctl-edit.c 36+++ b/src/systemctl/systemctl-edit.c
37@@ -13,6 +13,8 @@ 37@@ -13,6 +13,8 @@
@@ -44,5 +44,5 @@ index 15398f8364..e7d53ca9a1 100644
44 _cleanup_hashmap_free_ Hashmap *cached_id_map = NULL, *cached_name_map = NULL; 44 _cleanup_hashmap_free_ Hashmap *cached_id_map = NULL, *cached_name_map = NULL;
45 _cleanup_(lookup_paths_done) LookupPaths lp = {}; 45 _cleanup_(lookup_paths_done) LookupPaths lp = {};
46-- 46--
472.45.1 472.34.1
48 48
diff --git a/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch b/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch
new file mode 100644
index 0000000000..d791ad2da1
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch
@@ -0,0 +1,288 @@
1From a90044320eecda424ed678d283ef60806c70fcda Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 2 Jul 2024 23:23:57 -0700
4Subject: [PATCH 25/26] adjust header inclusion order to avoid redeclaration
5
6Upstream-Status: Inappropriate [musl specific]
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 src/basic/parse-util.c | 3 ++-
11 src/libsystemd-network/ndisc-option.c | 6 +++---
12 src/libsystemd-network/sd-radv.c | 5 +++--
13 src/network/netdev/l2tp-tunnel.c | 9 ++++-----
14 src/network/netdev/l2tp-tunnel.h | 6 +++---
15 src/network/netdev/wireguard.c | 2 +-
16 src/network/networkctl-link-info.c | 4 ++--
17 src/network/networkd-bridge-mdb.c | 3 ++-
18 src/network/networkd-route.c | 8 ++++----
19 src/resolve/resolved-dns-stream.c | 5 +++--
20 src/resolve/resolved-manager.c | 5 +++--
21 src/shared/conf-parser.c | 3 ++-
22 12 files changed, 32 insertions(+), 27 deletions(-)
23
24diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
25index faa5344921..0fc9d12c89 100644
26--- a/src/basic/parse-util.c
27+++ b/src/basic/parse-util.c
28@@ -2,7 +2,6 @@
29
30 #include <errno.h>
31 #include <inttypes.h>
32-#include <linux/ipv6.h>
33 #include <net/if.h>
34 #include <stdio.h>
35 #include <stdlib.h>
36@@ -20,6 +19,8 @@
37 #include "string-util.h"
38 #include "strv.h"
39
40+#include <linux/ipv6.h>
41+
42 int parse_boolean(const char *v) {
43 if (!v)
44 return -EINVAL;
45diff --git a/src/libsystemd-network/ndisc-option.c b/src/libsystemd-network/ndisc-option.c
46index 3aab51f51b..feeb4c78e5 100644
47--- a/src/libsystemd-network/ndisc-option.c
48+++ b/src/libsystemd-network/ndisc-option.c
49@@ -1,8 +1,5 @@
50 /* SPDX-License-Identifier: LGPL-2.1-or-later */
51
52-#include <linux/ipv6.h>
53-#include <netinet/icmp6.h>
54-
55 #include "dns-resolver-internal.h"
56 #include "dns-domain.h"
57 #include "ether-addr-util.h"
58@@ -16,6 +13,9 @@
59 #include "strv.h"
60 #include "unaligned.h"
61
62+#include <linux/ipv6.h>
63+#include <netinet/icmp6.h>
64+
65 /* RFC does not say anything about the maximum number of options, but let's limit the number of options for
66 * safety. Typically, the number of options in an ICMPv6 message should be only a few. */
67 #define MAX_OPTIONS 128
68diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c
69index f241929ad5..7cef3c3f71 100644
70--- a/src/libsystemd-network/sd-radv.c
71+++ b/src/libsystemd-network/sd-radv.c
72@@ -3,8 +3,6 @@
73 Copyright © 2017 Intel Corporation. All rights reserved.
74 ***/
75
76-#include <linux/ipv6.h>
77-#include <netinet/icmp6.h>
78 #include <netinet/in.h>
79 #include <arpa/inet.h>
80
81@@ -29,6 +27,9 @@
82 #include "strv.h"
83 #include "unaligned.h"
84
85+#include <linux/ipv6.h>
86+#include <netinet/icmp6.h>
87+
88 int sd_radv_new(sd_radv **ret) {
89 _cleanup_(sd_radv_unrefp) sd_radv *ra = NULL;
90
91diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c
92index c87e44797b..437b40c114 100644
93--- a/src/network/netdev/l2tp-tunnel.c
94+++ b/src/network/netdev/l2tp-tunnel.c
95@@ -1,10 +1,5 @@
96 /* SPDX-License-Identifier: LGPL-2.1-or-later */
97
98-#include <netinet/in.h>
99-#include <linux/if_arp.h>
100-#include <linux/l2tp.h>
101-#include <linux/genetlink.h>
102-
103 #include "conf-parser.h"
104 #include "hashmap.h"
105 #include "l2tp-tunnel.h"
106@@ -17,6 +12,10 @@
107 #include "string-table.h"
108 #include "string-util.h"
109
110+#include <netinet/in.h>
111+#include <linux/l2tp.h>
112+#include <linux/genetlink.h>
113+
114 static const char* const l2tp_l2spec_type_table[_NETDEV_L2TP_L2SPECTYPE_MAX] = {
115 [NETDEV_L2TP_L2SPECTYPE_NONE] = "none",
116 [NETDEV_L2TP_L2SPECTYPE_DEFAULT] = "default",
117diff --git a/src/network/netdev/l2tp-tunnel.h b/src/network/netdev/l2tp-tunnel.h
118index c558ed49de..8419ef34c5 100644
119--- a/src/network/netdev/l2tp-tunnel.h
120+++ b/src/network/netdev/l2tp-tunnel.h
121@@ -1,13 +1,13 @@
122 /* SPDX-License-Identifier: LGPL-2.1-or-later */
123 #pragma once
124
125-#include <netinet/in.h>
126-#include <linux/l2tp.h>
127-
128 #include "in-addr-util.h"
129 #include "netdev.h"
130 #include "networkd-util.h"
131
132+#include <netinet/in.h>
133+#include <linux/l2tp.h>
134+
135 typedef enum L2tpL2specType {
136 NETDEV_L2TP_L2SPECTYPE_NONE = L2TP_L2SPECTYPE_NONE,
137 NETDEV_L2TP_L2SPECTYPE_DEFAULT = L2TP_L2SPECTYPE_DEFAULT,
138diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
139index 5182783f45..79b21cb4ba 100644
140--- a/src/network/netdev/wireguard.c
141+++ b/src/network/netdev/wireguard.c
142@@ -5,9 +5,9 @@
143
144 /* Make sure the net/if.h header is included before any linux/ one */
145 #include <net/if.h>
146+#include <netinet/in.h>
147 //#include <linux/if_arp.h>
148 #include <linux/ipv6_route.h>
149-#include <netinet/in.h>
150 #include <sys/ioctl.h>
151
152 #include "sd-resolve.h"
153diff --git a/src/network/networkctl-link-info.c b/src/network/networkctl-link-info.c
154index f356d3c231..216c442de1 100644
155--- a/src/network/networkctl-link-info.c
156+++ b/src/network/networkctl-link-info.c
157@@ -1,7 +1,5 @@
158 /* SPDX-License-Identifier: LGPL-2.1-or-later */
159
160-#include <linux/if_tunnel.h>
161-
162 #include "bus-common-errors.h"
163 #include "bus-error.h"
164 #include "bus-util.h"
165@@ -16,6 +14,8 @@
166 #include "strxcpyx.h"
167 #include "wifi-util.h"
168
169+#include <linux/if_tunnel.h>
170+
171 /* use 128 kB for receive socket kernel queue, we shouldn't need more here */
172 #define RCVBUF_SIZE (128*1024)
173
174diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
175index 358ca4d294..fe87f7c093 100644
176--- a/src/network/networkd-bridge-mdb.c
177+++ b/src/network/networkd-bridge-mdb.c
178@@ -2,7 +2,6 @@
179
180 /* Make sure the net/if.h header is included before any linux/ one */
181 #include <net/if.h>
182-#include <linux/if_bridge.h>
183
184 #include "netlink-util.h"
185 #include "networkd-bridge-mdb.h"
186@@ -13,6 +12,8 @@
187 #include "string-util.h"
188 #include "vlan-util.h"
189
190+#include <linux/if_bridge.h>
191+
192 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
193
194 /* remove MDB entry. */
195diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
196index 0f3f79ec4f..325743bebf 100644
197--- a/src/network/networkd-route.c
198+++ b/src/network/networkd-route.c
199@@ -1,9 +1,5 @@
200 /* SPDX-License-Identifier: LGPL-2.1-or-later */
201
202-#include <linux/if.h>
203-#include <linux/ipv6_route.h>
204-#include <linux/nexthop.h>
205-
206 #include "alloc-util.h"
207 #include "event-util.h"
208 #include "netlink-util.h"
209@@ -21,6 +17,10 @@
210 #include "vrf.h"
211 #include "wireguard.h"
212
213+#include <linux/if.h>
214+#include <linux/ipv6_route.h>
215+#include <linux/nexthop.h>
216+
217 static Route* route_detach_impl(Route *route) {
218 assert(route);
219 assert(!!route->network + !!route->manager + !!route->wireguard <= 1);
220diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c
221index e57af66221..f66d8f0606 100644
222--- a/src/resolve/resolved-dns-stream.c
223+++ b/src/resolve/resolved-dns-stream.c
224@@ -1,7 +1,5 @@
225 /* SPDX-License-Identifier: LGPL-2.1-or-later */
226
227-#include <linux/if_arp.h>
228-#include <netinet/tcp.h>
229 #include <unistd.h>
230
231 #include "alloc-util.h"
232@@ -12,6 +10,9 @@
233 #include "resolved-dns-stream.h"
234 #include "resolved-manager.h"
235
236+//#include <linux/if_arp.h>
237+#include <netinet/tcp.h>
238+
239 #define DNS_STREAMS_MAX 128
240
241 #define DNS_QUERIES_PER_STREAM 32
242diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
243index dbaad81734..b988e75851 100644
244--- a/src/resolve/resolved-manager.c
245+++ b/src/resolve/resolved-manager.c
246@@ -1,8 +1,6 @@
247 /* SPDX-License-Identifier: LGPL-2.1-or-later */
248
249 #include <fcntl.h>
250-#include <linux/ipv6.h>
251-#include <netinet/in.h>
252 #include <poll.h>
253 #include <sys/ioctl.h>
254 #include <sys/stat.h>
255@@ -46,6 +44,9 @@
256 #include "utf8.h"
257 #include "varlink-util.h"
258
259+#include <linux/ipv6.h>
260+#include <netinet/in.h>
261+
262 #define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
263
264 static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
265diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
266index eaa8a5f11c..03379e7474 100644
267--- a/src/shared/conf-parser.c
268+++ b/src/shared/conf-parser.c
269@@ -2,7 +2,6 @@
270
271 #include <errno.h>
272 #include <limits.h>
273-#include <linux/ipv6.h>
274 #include <stdint.h>
275 #include <stdio.h>
276 #include <stdlib.h>
277@@ -47,6 +46,8 @@
278 #include "time-util.h"
279 #include "utf8.h"
280
281+#include <linux/ipv6.h>
282+
283 DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(config_file_hash_ops_fclose,
284 char, path_hash_func, path_compare,
285 FILE, safe_fclose);
286--
2872.34.1
288
diff --git a/meta/recipes-core/systemd/systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch b/meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch
index 501728cbc8..a7549ee151 100644
--- a/meta/recipes-core/systemd/systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch
+++ b/meta/recipes-core/systemd/systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch
@@ -1,7 +1,7 @@
1From 0e4379088b1cf607b605b785f6f23943ebeb6584 Mon Sep 17 00:00:00 2001 1From f2a7cf1d2a2bc2516a180809efd85c828cd9c7f4 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 3 Jul 2024 07:18:42 -0700 3Date: Wed, 3 Jul 2024 07:18:42 -0700
4Subject: [PATCH 28/28] build-path.c: avoid boot time segfault for musl 4Subject: [PATCH 26/26] build-path.c: avoid boot time segfault for musl
5 5
6This function, at runtime, should return -ENOEXEC. For musl, it 6This function, at runtime, should return -ENOEXEC. For musl, it
7somehow segfaults. I think it's related to getauxval, but it's 7somehow segfaults. I think it's related to getauxval, but it's
@@ -27,5 +27,5 @@ index b5972658df..4ef551034e 100644
27 const char *runpath = NULL; 27 const char *runpath = NULL;
28 28
29-- 29--
302.45.1 302.34.1
31 31
diff --git a/meta/recipes-core/systemd/systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch b/meta/recipes-core/systemd/systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch
deleted file mode 100644
index 1be075d606..0000000000
--- a/meta/recipes-core/systemd/systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1From cf94d43572770007f95b832f477aa5a03624a1e5 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 2 Jul 2024 23:23:57 -0700
4Subject: [PATCH 27/27] adjust header inclusion order to avoid redeclaration
5
6Upstream-Status: Inappropriate [musl specific]
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 src/network/netdev/wireguard.c | 2 +-
11 src/network/networkd-bridge-mdb.c | 3 ++-
12 src/network/networkd-route.c | 6 +++---
13 3 files changed, 6 insertions(+), 5 deletions(-)
14
15diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
16index 94b659fd23..a78ad5762d 100644
17--- a/src/network/netdev/wireguard.c
18+++ b/src/network/netdev/wireguard.c
19@@ -5,9 +5,9 @@
20
21 /* Make sure the net/if.h header is included before any linux/ one */
22 #include <net/if.h>
23+#include <netinet/in.h>
24 //#include <linux/if_arp.h>
25 #include <linux/ipv6_route.h>
26-#include <netinet/in.h>
27 #include <sys/ioctl.h>
28
29 #include "sd-resolve.h"
30diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
31index 7ff4a18846..fe1a9cf888 100644
32--- a/src/network/networkd-bridge-mdb.c
33+++ b/src/network/networkd-bridge-mdb.c
34@@ -2,7 +2,6 @@
35
36 /* Make sure the net/if.h header is included before any linux/ one */
37 #include <net/if.h>
38-#include <linux/if_bridge.h>
39
40 #include "netlink-util.h"
41 #include "networkd-bridge-mdb.h"
42@@ -13,6 +12,8 @@
43 #include "string-util.h"
44 #include "vlan-util.h"
45
46+#include <linux/if_bridge.h>
47+
48 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
49
50 /* remove MDB entry. */
51diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
52index d596fd81e6..0dc0d2a7a3 100644
53--- a/src/network/networkd-route.c
54+++ b/src/network/networkd-route.c
55@@ -1,8 +1,5 @@
56 /* SPDX-License-Identifier: LGPL-2.1-or-later */
57
58-#include <linux/ipv6_route.h>
59-#include <linux/nexthop.h>
60-
61 #include "alloc-util.h"
62 #include "event-util.h"
63 #include "netlink-util.h"
64@@ -20,6 +17,9 @@
65 #include "vrf.h"
66 #include "wireguard.h"
67
68+#include <linux/ipv6_route.h>
69+#include <linux/nexthop.h>
70+
71 static Route* route_detach_impl(Route *route) {
72 assert(route);
73 assert(!!route->network + !!route->manager + !!route->wireguard <= 1);
74--
752.45.1
76
diff --git a/meta/recipes-core/systemd/systemd_256.9.bb b/meta/recipes-core/systemd/systemd_257.bb
index b5e3e85a38..170c54f6c9 100644
--- a/meta/recipes-core/systemd/systemd_256.9.bb
+++ b/meta/recipes-core/systemd/systemd_257.bb
@@ -28,37 +28,35 @@ SRC_URI += " \
28 file://systemd-pager.sh \ 28 file://systemd-pager.sh \
29 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ 29 file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
30 file://0002-implment-systemd-sysv-install-for-OE.patch \ 30 file://0002-implment-systemd-sysv-install-for-OE.patch \
31 file://0003-coredump-set-ProtectHome-to-read-only.patch \
32 " 31 "
33 32
34# patches needed by musl 33# patches needed by musl
35SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" 34SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}"
36SRC_URI_MUSL = "\ 35SRC_URI_MUSL = "\
37 file://0004-missing_type.h-add-comparison_fn_t.patch \ 36 file://0003-missing_type.h-add-comparison_fn_t.patch \
38 file://0005-add-fallback-parse_printf_format-implementation.patch \ 37 file://0004-add-fallback-parse_printf_format-implementation.patch \
39 file://0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ 38 file://0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
40 file://0007-add-missing-FTW_-macros-for-musl.patch \ 39 file://0006-add-missing-FTW_-macros-for-musl.patch \
41 file://0008-Use-uintmax_t-for-handling-rlim_t.patch \ 40 file://0007-Use-uintmax_t-for-handling-rlim_t.patch \
42 file://0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ 41 file://0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
43 file://0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ 42 file://0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \
44 file://0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ 43 file://0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \
45 file://0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ 44 file://0011-avoid-redefinition-of-prctl_mm_map-structure.patch \
46 file://0013-avoid-redefinition-of-prctl_mm_map-structure.patch \ 45 file://0012-do-not-disable-buffer-in-writing-files.patch \
47 file://0014-do-not-disable-buffer-in-writing-files.patch \ 46 file://0013-Handle-__cpu_mask-usage.patch \
48 file://0015-Handle-__cpu_mask-usage.patch \ 47 file://0014-Handle-missing-gshadow.patch \
49 file://0016-Handle-missing-gshadow.patch \ 48 file://0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \
50 file://0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ 49 file://0016-pass-correct-parameters-to-getdents64.patch \
51 file://0018-pass-correct-parameters-to-getdents64.patch \ 50 file://0017-Adjust-for-musl-headers.patch \
52 file://0019-Adjust-for-musl-headers.patch \ 51 file://0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \
53 file://0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ 52 file://0019-errno-util-Make-STRERROR-portable-for-musl.patch \
54 file://0021-errno-util-Make-STRERROR-portable-for-musl.patch \ 53 file://0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch \
55 file://0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ 54 file://0021-shared-Do-not-use-malloc_info-on-musl.patch \
56 file://0023-shared-Do-not-use-malloc_info-on-musl.patch \ 55 file://0022-avoid-missing-LOCK_EX-declaration.patch \
57 file://0024-avoid-missing-LOCK_EX-declaration.patch \ 56 file://0023-include-signal.h-to-avoid-the-undeclared-error.patch \
58 file://0025-include-signal.h-to-avoid-the-undeclared-error.patch \ 57 file://0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch \
59 file://0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch \ 58 file://0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch \
60 file://0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch \ 59 file://0026-build-path.c-avoid-boot-time-segfault-for-musl.patch \
61 file://0028-build-path.c-avoid-boot-time-segfault-for-musl.patch \
62 " 60 "
63 61
64PAM_PLUGINS = " \ 62PAM_PLUGINS = " \