~xdavidwu/systemd-apkbuilds

c3600c8011590a2695ca7fa21a665886b6daa7a8 — Pinghao Wu 24 days ago a11c3f0
systemd: 257.2
30 files changed, 623 insertions(+), 563 deletions(-)

R systemd/{0004-missing_type.h-add-comparison_fn_t.patch => 0003-missing_type.h-add-comparison_fn_t.patch}
R systemd/{0005-add-fallback-parse_printf_format-implementation.patch => 0004-add-fallback-parse_printf_format-implementation.patch}
R systemd/{0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch => 0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch}
R systemd/{0007-add-missing-FTW_-macros-for-musl.patch => 0006-add-missing-FTW_-macros-for-musl.patch}
R systemd/{0008-Use-uintmax_t-for-handling-rlim_t.patch => 0007-Use-uintmax_t-for-handling-rlim_t.patch}
R systemd/{0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch => 0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch}
R systemd/{0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch => 0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch}
D systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
R systemd/{0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch => 0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch}
R systemd/{0013-avoid-redefinition-of-prctl_mm_map-structure.patch => 0011-avoid-redefinition-of-prctl_mm_map-structure.patch}
R systemd/{0014-do-not-disable-buffer-in-writing-files.patch => 0012-do-not-disable-buffer-in-writing-files.patch}
R systemd/{0015-Handle-__cpu_mask-usage.patch => 0013-Handle-__cpu_mask-usage.patch}
R systemd/{0016-Handle-missing-gshadow.patch => 0014-Handle-missing-gshadow.patch}
R systemd/{0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch => 0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch}
R systemd/{0018-pass-correct-parameters-to-getdents64.patch => 0016-pass-correct-parameters-to-getdents64.patch}
R systemd/{0019-Adjust-for-musl-headers.patch => 0017-Adjust-for-musl-headers.patch}
R systemd/{0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch => 0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch}
R systemd/{0021-errno-util-Make-STRERROR-portable-for-musl.patch => 0019-errno-util-Make-STRERROR-portable-for-musl.patch}
R systemd/{0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch => 0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch}
R systemd/{0023-shared-Do-not-use-malloc_info-on-musl.patch => 0021-shared-Do-not-use-malloc_info-on-musl.patch}
R systemd/{0024-avoid-missing-LOCK_EX-declaration.patch => 0022-avoid-missing-LOCK_EX-declaration.patch}
R systemd/{0025-include-signal.h-to-avoid-the-undeclared-error.patch => 0023-include-signal.h-to-avoid-the-undeclared-error.patch}
R systemd/{0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch => 0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch}
A systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch
R systemd/{0028-build-path.c-avoid-boot-time-segfault-for-musl.patch => 0026-build-path.c-avoid-boot-time-segfault-for-musl.patch}
D systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch
M systemd/0100-Do-not-buffer-on-systemd-sleep.patch
M systemd/0101-efi-do-not-set-wide-exec-charset.patch
M systemd/0102-efi-hack-out-musl-wchar-definition.patch
M systemd/APKBUILD
R systemd/0004-missing_type.h-add-comparison_fn_t.patch => systemd/0003-missing_type.h-add-comparison_fn_t.patch +4 -4
@@ 1,7 1,7 @@
From 34b7e1ed3b9a896db6fad435fd141c385c7337d1 Mon Sep 17 00:00:00 2001
From f99ef6c4407b56e8d15455fe27eb732ada87215b Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 13:55:12 +0800
Subject: [PATCH 04/27] missing_type.h: add comparison_fn_t
Subject: [PATCH 03/26] missing_type.h: add comparison_fn_t

Make it work with musl where comparison_fn_t and is not provided.



@@ 45,7 45,7 @@ index 9c818bd747..ef10c8be2c 100644
 /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the
  * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that
diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c
index a0b673f65f..29dd2fee16 100644
index 7dcc35d8d5..87b8d6aad6 100644
--- a/src/libsystemd/sd-journal/catalog.c
+++ b/src/libsystemd/sd-journal/catalog.c
@@ -29,6 +29,7 @@


@@ 57,5 57,5 @@ index a0b673f65f..29dd2fee16 100644
 const char * const catalog_file_dirs[] = {
         "/usr/local/lib/systemd/catalog/",
-- 
2.45.1
2.34.1


R systemd/0005-add-fallback-parse_printf_format-implementation.patch => systemd/0004-add-fallback-parse_printf_format-implementation.patch +8 -8
@@ 1,7 1,7 @@
From 4a4005583e2debe491850229aa5ae2a97770532d Mon Sep 17 00:00:00 2001
From 34fe809cf686c1a81db5f3f027e33fece350ba0b Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Sat, 22 May 2021 20:26:24 +0200
Subject: [PATCH 05/27] add fallback parse_printf_format implementation
Subject: [PATCH 04/26] add fallback parse_printf_format implementation

Upstream-Status: Inappropriate [musl specific]



@@ 22,22 22,22 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 create mode 100644 src/basic/parse-printf-format.h

diff --git a/meson.build b/meson.build
index 52723bef09..e20bf3af8a 100644
index bffda86845..4146f4beef 100644
--- a/meson.build
+++ b/meson.build
@@ -753,6 +753,7 @@ foreach header : ['crypt.h',
@@ -773,6 +773,7 @@ foreach header : ['crypt.h',
                   'linux/ioprio.h',
                   'linux/memfd.h',
                   'linux/time_types.h',
                   'linux/vm_sockets.h',
+                  'printf.h',
                   'sys/auxv.h',
                   'sys/sdt.h',
                   'threads.h',
diff --git a/src/basic/meson.build b/src/basic/meson.build
index 9a214575a5..b49b6ade56 100644
index e02f787c75..9435df895d 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
@@ -189,6 +189,11 @@ endforeach
@@ -188,6 +188,11 @@ endforeach
 
 basic_sources += generated_gperf_headers
 


@@ 430,5 430,5 @@ index 7d02b57d7b..75e8e08add 100644
 #define SNDBUF_SIZE (8*1024*1024)
 
-- 
2.45.1
2.34.1


R systemd/0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch => systemd/0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +6 -6
@@ 1,7 1,7 @@
From ed836c3478e1193e99e37d50db96d124796a3322 Mon Sep 17 00:00:00 2001
From d368a0317c747961f69a455a09a3de3fd13410a2 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 14:56:21 +0800
Subject: [PATCH 06/27] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
Subject: [PATCH 05/26] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
 defined

If the standard library doesn't provide brace


@@ 115,7 115,7 @@ index 49d71f15c7..0a49ebcc17 100644
 
         (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 807925f199..b4f86fc611 100644
index 86bf16356d..da552dbaab 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -73,6 +73,12 @@


@@ 131,7 131,7 @@ index 807925f199..b4f86fc611 100644
 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
  * them in the file system. This is intended to be used to create
  * properly owned directories beneath /tmp, /var/tmp, /run, which are
@@ -2570,7 +2576,9 @@ finish:
@@ -2573,7 +2579,9 @@ finish:
 
 static int glob_item(Context *c, Item *i, action_t action) {
         _cleanup_globfree_ glob_t g = {


@@ 141,7 141,7 @@ index 807925f199..b4f86fc611 100644
         };
         int r;
 
@@ -2598,7 +2606,9 @@ static int glob_item_recursively(
@@ -2601,7 +2609,9 @@ static int glob_item_recursively(
                 fdaction_t action) {
 
         _cleanup_globfree_ glob_t g = {


@@ 152,5 152,5 @@ index 807925f199..b4f86fc611 100644
         int r;
 
-- 
2.45.1
2.34.1


R systemd/0007-add-missing-FTW_-macros-for-musl.patch => systemd/0006-add-missing-FTW_-macros-for-musl.patch +3 -3
@@ 1,7 1,7 @@
From 8320725f1a9088623da8753c7077473b98a63107 Mon Sep 17 00:00:00 2001
From 54b6e10aea2b0fb52782c3a71f06654a89b46bff Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:00:06 +0800
Subject: [PATCH 07/27] add missing FTW_ macros for musl
Subject: [PATCH 06/26] add missing FTW_ macros for musl

This is to avoid build failures like below for musl.



@@ 40,5 40,5 @@ index 8684d064ec..70fc2b5376 100644
 static char **list_nftw = NULL;
 
-- 
2.45.1
2.34.1


R systemd/0008-Use-uintmax_t-for-handling-rlim_t.patch => systemd/0007-Use-uintmax_t-for-handling-rlim_t.patch +7 -7
@@ 1,7 1,7 @@
From 41abe1a4136babfe5df63e9561dcf29d3c8fe6e9 Mon Sep 17 00:00:00 2001
From 85d8c4c27e855d54c1740902a836c8f2aea9bebc Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:12:41 +0800
Subject: [PATCH 08/27] Use uintmax_t for handling rlim_t
Subject: [PATCH 07/26] Use uintmax_t for handling rlim_t

PRIu{32,64} is not right format to represent rlim_t type
therefore use %ju and typecast the rlim_t variables to


@@ 27,10 27,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 3 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/src/basic/format-util.h b/src/basic/format-util.h
index ba7cff6a8b..2736abb07b 100644
index b528c005ca..41c4c095be 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
@@ -42,13 +42,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
@@ -41,13 +41,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t));
 #  error Unknown timex member size
 #endif
 


@@ 86,10 86,10 @@ index a9f7b87f28..059c67731d 100644
         return 1;
 }
diff --git a/src/core/execute.c b/src/core/execute.c
index 513e95e09d..0e269617f8 100644
index 3d55b0b772..4824ff159e 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -1067,9 +1067,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
@@ -1162,9 +1162,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
         for (unsigned i = 0; i < RLIM_NLIMITS; i++)
                 if (c->rlimit[i]) {
                         fprintf(f, "%sLimit%s: " RLIM_FMT "\n",


@@ 102,5 102,5 @@ index 513e95e09d..0e269617f8 100644
 
         if (c->ioprio_set) {
-- 
2.45.1
2.34.1


R systemd/0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch => systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch +5 -5
@@ 1,7 1,7 @@
From ea8e85d92f67a7af8577a4ce7c67c7aaee65d10c Mon Sep 17 00:00:00 2001
From f4cd939c7cc1ce0a59bab2693768f2c95d9ced00 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 27 May 2018 08:36:44 -0700
Subject: [PATCH 10/27] Define glibc compatible basename() for non-glibc
Subject: [PATCH 08/26] Define glibc compatible basename() for non-glibc
 systems

Fixes builds with musl, even though systemd is adamant about


@@ 15,10 15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 1 file changed, 4 insertions(+)

diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index ff5efbcf55..d1a6bb0e76 100644
index cc6aa183c0..0b035125cd 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -26,6 +26,10 @@
@@ -27,6 +27,10 @@
 #define URI_UNRESERVED      ALPHANUMERICAL "-._~"       /* [RFC3986] */
 #define URI_VALID           URI_RESERVED URI_UNRESERVED /* [RFC3986] */
 


@@ 30,5 30,5 @@ index ff5efbcf55..d1a6bb0e76 100644
         if (!haystack || !needle)
                 return NULL;
-- 
2.45.1
2.34.1


R systemd/0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch => systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +5 -5
@@ 1,7 1,7 @@
From 7c8634c441401b034cd4bcf4b916a7042076fca8 Mon Sep 17 00:00:00 2001
From 6959db351fdd551d46e22667deec6032552b2662 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Wed, 4 Jul 2018 15:00:44 +0800
Subject: [PATCH 11/27] Do not disable buffering when writing to oom_score_adj
Subject: [PATCH 09/26] Do not disable buffering when writing to oom_score_adj

On musl, disabling buffering when writing to oom_score_adj will
cause the following error.


@@ 24,10 24,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index c9d968dee0..7d6d3ce7db 100644
index 3253a9c3fb..772c4082a1 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1816,7 +1816,7 @@ int set_oom_score_adjust(int value) {
@@ -1848,7 +1848,7 @@ int set_oom_score_adjust(int value) {
         xsprintf(t, "%i", value);
 
         return write_string_file("/proc/self/oom_score_adj", t,


@@ 37,5 37,5 @@ index c9d968dee0..7d6d3ce7db 100644
 
 int get_oom_score_adjust(int *ret) {
-- 
2.45.1
2.34.1


D systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch => systemd/0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +0 -99
@@ 1,99 0,0 @@
From 8af5d1e3c0dc7e71f7a4aee0f539a5d772d47354 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 10 Oct 2017 14:33:30 -0700
Subject: [PATCH 09/27] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat()

Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right
thing to do and it's not portable (not supported by musl). See:

  http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
  http://www.openwall.com/lists/musl/2015/02/05/2

Note that laccess() is never passing AT_EACCESS so a lot of the
discussion in the links above doesn't apply. Note also that
(currently) all systemd callers of laccess() pass mode as F_OK, so
only check for existence of a file, not access permissions.
Therefore, in this case, the only distiction between faccessat()
with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the behaviour
for broken symlinks; laccess() on a broken symlink will succeed with
(flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).

The laccess() macros was added to systemd some time ago and it's not
clear if or why it needs to return success for broken symlinks. Maybe
just historical and not actually necessary or desired behaviour?

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 src/basic/fs-util.h          | 21 ++++++++++++++++++++-
 src/shared/base-filesystem.c |  6 +++---
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 3e2db95304..d5747416b0 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]);
 int fd_warn_permissions(const char *path, int fd);
 int stat_warn_permissions(const char *path, const struct stat *st);
 
+/*
+   Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to
+   do and it's not portable (not supported by musl). See:
+
+     http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003610.html
+     http://www.openwall.com/lists/musl/2015/02/05/2
+
+   Note that laccess() is never passing AT_EACCESS so a lot of the discussion in
+   the links above doesn't apply. Note also that (currently) all systemd callers
+   of laccess() pass mode as F_OK, so only check for existence of a file, not
+   access permissions. Therefore, in this case, the only distiction between
+   faccessat() with (flag == 0) and (flag == AT_SYMLINK_NOFOLLOW) is the
+   behaviour for broken symlinks; laccess() on a broken symlink will succeed
+   with (flag == AT_SYMLINK_NOFOLLOW) and fail (flag == 0).
+
+   The laccess() macros was added to systemd some time ago and it's not clear if
+   or why it needs to return success for broken symlinks. Maybe just historical
+   and not actually necessary or desired behaviour?
+*/
 #define laccess(path, mode)                                             \
-        RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW))
+        RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0))
 
 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
 
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index a4e2dae245..67aa8ea1f2 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
         /* The "root" parameter is decoration only – it's only used as part of log messages */
 
         for (size_t i = 0; i < ELEMENTSOF(table); i++) {
-                if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0)
+                if (faccessat(fd, table[i].dir, F_OK, 0) >= 0)
                         continue;
 
                 if (table[i].target) { /* Create as symlink? */
@@ -153,7 +153,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
 
                         /* check if one of the targets exists */
                         NULSTR_FOREACH(s, table[i].target) {
-                                if (faccessat(fd, s, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
+                                if (faccessat(fd, s, F_OK, 0) < 0)
                                         continue;
 
                                 /* check if a specific file exists at the target path */
@@ -164,7 +164,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) {
                                         if (!p)
                                                 return log_oom();
 
-                                        if (faccessat(fd, p, F_OK, AT_SYMLINK_NOFOLLOW) < 0)
+                                        if (faccessat(fd, p, F_OK, 0) < 0)
                                                 continue;
                                 }
 
-- 
2.45.1


R systemd/0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch => systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +6 -6
@@ 1,7 1,7 @@
From 4a2df0bba1741914617ca1271e2bc68a5d9e5dac Mon Sep 17 00:00:00 2001
From b7f6c245b4ae72999f23eecc2bbb6d6fb8db667c Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 10 Jul 2018 15:40:17 +0800
Subject: [PATCH 12/27] distinguish XSI-compliant strerror_r from GNU-specifi
Subject: [PATCH 10/26] distinguish XSI-compliant strerror_r from GNU-specifi
 strerror_r

XSI-compliant strerror_r and GNU-specifi strerror_r are different.


@@ 24,10 24,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index f415797700..a5c6e9a3bd 100644
index 58c24d25c0..69a0d09d42 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -410,7 +410,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
@@ -405,7 +405,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) {
                         return;
 
                 errno = 0;


@@ 40,7 40,7 @@ index f415797700..a5c6e9a3bd 100644
                 if (errno == ERANGE || strlen(x) >= k - 1) {
                         free(m);
                         k *= 2;
@@ -595,8 +600,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static
@@ -590,8 +595,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static
 
         if (e && e->message)
                 return e->message;


@@ 72,5 72,5 @@ index 75e8e08add..41e5c7c2b8 100644
                         char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1];
 
-- 
2.45.1
2.34.1


R systemd/0013-avoid-redefinition-of-prctl_mm_map-structure.patch => systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch +3 -3
@@ 1,7 1,7 @@
From 846b8f16cf07d9187261e06701a75eb208caa707 Mon Sep 17 00:00:00 2001
From 43b0269e850a2fbcb6ca615258aa8f8a9b4f6a9d Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 25 Feb 2019 15:44:54 +0800
Subject: [PATCH 13/27] avoid redefinition of prctl_mm_map structure
Subject: [PATCH 11/26] avoid redefinition of prctl_mm_map structure

Fix the following compile failure:
error: redefinition of 'struct prctl_mm_map'


@@ 28,5 28,5 @@ index 2c9f9f6c50..65a984b564 100644
 #include "macro.h"
 
-- 
2.45.1
2.34.1


R systemd/0014-do-not-disable-buffer-in-writing-files.patch => systemd/0012-do-not-disable-buffer-in-writing-files.patch +108 -150
@@ 1,7 1,7 @@
From 88694101bcac461c39049962ce97ce579cc07e13 Mon Sep 17 00:00:00 2001
From eaf26fdad00448b8cd336eb5db51e0baa8d8e588 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Fri, 1 Mar 2019 15:22:15 +0800
Subject: [PATCH 14/27] do not disable buffer in writing files
Date: Mon, 16 Dec 2024 14:37:25 +0800
Subject: [PATCH 12/26] do not disable buffer in writing files

Do not disable buffer in writing files, otherwise we get
failure at boot for musl like below.


@@ 22,35 22,34 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
[rebased for systemd 255.1]
---
 src/basic/cgroup-util.c              | 12 ++++++------
 src/basic/cgroup-util.c              |  4 ++--
 src/basic/namespace-util.c           |  4 ++--
 src/basic/procfs-util.c              |  4 ++--
 src/basic/sysctl-util.c              |  2 +-
 src/binfmt/binfmt.c                  |  6 +++---
 src/core/cgroup.c                    |  2 +-
 src/core/ipe-setup.c                 |  2 +-
 src/core/main.c                      |  2 +-
 src/core/smack-setup.c               |  8 ++++----
 src/core/smack-setup.c               |  6 +++---
 src/home/homework.c                  |  2 +-
 src/libsystemd/sd-device/sd-device.c |  2 +-
 src/nspawn/nspawn-cgroup.c           |  2 +-
 src/nspawn/nspawn.c                  |  6 +++---
 src/shared/binfmt-util.c             |  2 +-
 src/shared/cgroup-setup.c            |  6 +++---
 src/shared/coredump-util.c           |  4 ++--
 src/shared/cgroup-setup.c            | 12 ++++++------
 src/shared/coredump-util.c           |  2 +-
 src/shared/hibernate-util.c          |  4 ++--
 src/shared/smack-util.c              |  2 +-
 src/shared/watchdog.c                |  2 +-
 src/sleep/sleep.c                    |  4 ++--
 src/sleep/sleep.c                    |  2 +-
 src/storagetm/storagetm.c            | 24 ++++++++++++------------
 src/udev/udev-rules.c                |  1 -
 src/vconsole/vconsole-setup.c        |  2 +-
 22 files changed, 51 insertions(+), 52 deletions(-)
 21 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 553ee6075a..a3704baf6a 100644
index 309dccb45a..7aec5072a0 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -457,7 +457,7 @@ int cg_kill_kernel_sigkill(const char *path) {
@@ -495,7 +495,7 @@ int cg_kill_kernel_sigkill(const char *path) {
         if (r < 0)
                 return r;
 


@@ 59,43 58,7 @@ index 553ee6075a..a3704baf6a 100644
         if (r < 0)
                 return log_debug_errno(r, "Failed to write to cgroup.kill for cgroup '%s': %m", path);
 
@@ -885,7 +885,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (isempty(sc)) {
-                r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER);
+                r = write_string_file(fs, agent, 0);
                 if (r < 0)
                         return r;
         } else if (!path_equal(sc, agent))
@@ -903,7 +903,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (streq(sc, "0")) {
-                r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
+                r = write_string_file(fs, "1", 0);
                 if (r < 0)
                         return r;
 
@@ -930,7 +930,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(fs, "0", 0);
         if (r < 0)
                 return r;
 
@@ -940,7 +940,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(fs, "", 0);
         if (r < 0)
                 return r;
 
@@ -1833,7 +1833,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
@@ -1721,7 +1721,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri
         if (r < 0)
                 return r;
 


@@ 105,10 68,10 @@ index 553ee6075a..a3704baf6a 100644
 
 int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) {
diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c
index 5b4e43f921..42a84ded55 100644
index 332e8cdfd5..804498127d 100644
--- a/src/basic/namespace-util.c
+++ b/src/basic/namespace-util.c
@@ -325,12 +325,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) {
@@ -354,12 +354,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) {
                 freeze();
 
         xsprintf(path, "/proc/" PID_FMT "/uid_map", pid);


@@ 144,15 107,15 @@ index d7cfcd9105..58fb5918a3 100644
                 uint64_t threads_max;
 
diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c
index 9a1933f579..7d6fc65ee1 100644
index 2feb4917d7..4c74620a00 100644
--- a/src/basic/sysctl-util.c
+++ b/src/basic/sysctl-util.c
@@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) {
 
         log_debug("Setting '%s' to '%s'", p, value);
@@ -97,7 +97,7 @@ int sysctl_write_full(const char *property, const char *value, Hashmap **shadow)
         if (r < 0)
                 return r;
 
-        return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
+        return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
+        return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0 | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL);
 }
 
 int sysctl_writef(const char *property, const char *format, ...) {


@@ 188,23 151,36 @@ index d21f3f79ff..258607cc7e 100644
                         log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m");
                 else
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 34fd2a250c..cb1a6d01eb 100644
index 6933aae54d..ab6fccc0e4 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -5173,7 +5173,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) {
                        freezer_state_to_string(u->freezer_state),
                        freezer_state_to_string(next));
@@ -5167,7 +5167,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(path, one_zero(target == FREEZER_FROZEN), WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(path, one_zero(target == FREEZER_FROZEN), 0);
-        r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(path, one_zero(objective == FREEZER_FROZEN), 0);
         if (r < 0)
                 return r;
 
diff --git a/src/core/ipe-setup.c b/src/core/ipe-setup.c
index 4648d43829..80d03d87d4 100644
--- a/src/core/ipe-setup.c
+++ b/src/core/ipe-setup.c
@@ -94,7 +94,7 @@ int ipe_setup(void) {
                 if (!activate_path)
                         return log_oom();
 
-                r = write_string_file(activate_path, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
+                r = write_string_file(activate_path, "1", 0);
                 if (r == -ESTALE) {
                         log_debug_errno(r,
                                         "IPE policy %s is already loaded with a version that is equal or higher, skipping.",
diff --git a/src/core/main.c b/src/core/main.c
index 4b8a315d86..051a31ba84 100644
index 172742c769..e68ce2a6d8 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1789,7 +1789,7 @@ static void initialize_core_pattern(bool skip_setup) {
@@ -1812,7 +1812,7 @@ static void initialize_core_pattern(bool skip_setup) {
         if (getpid_cached() != 1)
                 return;
 


@@ 214,7 190,7 @@ index 4b8a315d86..051a31ba84 100644
                 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m",
                                   arg_early_core_pattern);
diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c
index 7ea902b6f9..1aef2988d0 100644
index 7ea902b6f9..ee4cd56023 100644
--- a/src/core/smack-setup.c
+++ b/src/core/smack-setup.c
@@ -321,17 +321,17 @@ int mac_smack_setup(bool *loaded_policy) {


@@ 230,8 206,7 @@ index 7ea902b6f9..1aef2988d0 100644
         if (r < 0)
                 log_warning_errno(r, "Failed to set SMACK ambient label \"" SMACK_RUN_LABEL "\": %m");
         r = write_string_file("/sys/fs/smackfs/netlabel",
-                              "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
+                              "0.0.0.0/0 " SMACK_RUN_LABEL, 0);
                               "0.0.0.0/0 " SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER);
         if (r < 0)
                 log_warning_errno(r, "Failed to set SMACK netlabel rule \"0.0.0.0/0 " SMACK_RUN_LABEL "\": %m");
-        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
                 log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m");
 #endif
diff --git a/src/home/homework.c b/src/home/homework.c
index 482db23dbc..ed6b8d271f 100644
index 00e74894b3..7457113efe 100644
--- a/src/home/homework.c
+++ b/src/home/homework.c
@@ -302,8 +302,8 @@ static void drop_caches_now(void) {
         /* Drop file system caches now. See https://docs.kernel.org/admin-guide/sysctl/vm.html
@@ -304,7 +304,7 @@ static void drop_caches_now(void) {
          * for details. We write "3" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but
          * not more. */
+        r = write_string_file("/proc/sys/vm/drop_caches", "3\n", 0);
 
-        r = write_string_file("/proc/sys/vm/drop_caches", "3\n", WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file("/proc/sys/vm/drop_caches", "3\n", 0);
         if (r < 0)
                 log_warning_errno(r, "Failed to drop caches, ignoring: %m");
         else
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index d8d151835c..268cb65ec7 100644
index 01fa90b1ff..83ab655bf4 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -2499,7 +2499,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
@@ -2563,7 +2563,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
         if (!value)
                 return -ENOMEM;
 


@@ 267,7 241,7 @@ index d8d151835c..268cb65ec7 100644
                 /* On failure, clear cache entry, as we do not know how it fails. */
                 device_remove_cached_sysattr_value(device, sysattr);
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
index 4f28b4a225..c93c2c33b5 100644
index 4f28b4a225..c899c218b2 100644
--- a/src/nspawn/nspawn-cgroup.c
+++ b/src/nspawn/nspawn-cgroup.c
@@ -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
 
         sprintf(pid_string, PID_FMT, pid);
-        r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755);
+        r = write_string_file(fn, pid_string, WRITE_STRING_FILE_MKDIR_0755);
+        r = write_string_file(fn, pid_string, 0|WRITE_STRING_FILE_MKDIR_0755);
         if (r < 0) {
                 log_error_errno(r, "Failed to move process: %m");
                 goto finish;
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 5842d3ba8f..44ff9d946c 100644
index 500725d35f..745b6815db 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -2741,7 +2741,7 @@ static int reset_audit_loginuid(void) {
@@ -2857,7 +2857,7 @@ static int reset_audit_loginuid(void) {
         if (streq(p, "4294967295"))
                 return 0;
 


@@ 292,7 266,7 @@ index 5842d3ba8f..44ff9d946c 100644
         if (r < 0) {
                 log_error_errno(r,
                                 "Failed to reset audit login UID. This probably means that your kernel is too\n"
@@ -4450,7 +4450,7 @@ static int setup_uid_map(
@@ -4588,7 +4588,7 @@ static int setup_uid_map(
                 return log_oom();
 
         xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid);


@@ 301,7 275,7 @@ index 5842d3ba8f..44ff9d946c 100644
         if (r < 0)
                 return log_error_errno(r, "Failed to write UID map: %m");
 
@@ -4460,7 +4460,7 @@ static int setup_uid_map(
@@ -4598,7 +4598,7 @@ static int setup_uid_map(
                 return log_oom();
 
         xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid);


@@ 324,10 298,10 @@ index a26175474b..1413a9c72c 100644
                 return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m");
 
diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c
index 093b6d0d22..89d0ac612b 100644
index 49d40f60d8..0f4aa8512a 100644
--- a/src/shared/cgroup-setup.c
+++ b/src/shared/cgroup-setup.c
@@ -364,7 +364,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
@@ -369,7 +369,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
 
         xsprintf(c, PID_FMT "\n", pid);
 


@@ 336,7 310,7 @@ index 093b6d0d22..89d0ac612b 100644
         if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0)
                 /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */
                 return -EUCLEAN;
@@ -395,7 +395,7 @@ int cg_fd_attach(int fd, pid_t pid) {
@@ -399,7 +399,7 @@ int cg_fd_attach(int fd, pid_t pid) {
 
         xsprintf(c, PID_FMT "\n", pid);
 


@@ 345,28 319,46 @@ index 093b6d0d22..89d0ac612b 100644
 }
 
 int cg_attach_fallback(const char *controller, const char *path, pid_t pid) {
@@ -974,7 +974,7 @@ int cg_enable_everywhere(
                                         return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p);
                         }
 
-                        r = write_string_stream(f, s, WRITE_STRING_FILE_DISABLE_BUFFER);
+                        r = write_string_stream(f, s, 0);
                         if (r < 0) {
                                 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m",
                                                 FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs);
@@ -1049,7 +1049,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (isempty(sc)) {
-                r = write_string_file(fs, agent, WRITE_STRING_FILE_DISABLE_BUFFER);
+                r = write_string_file(fs, agent, 0);
                 if (r < 0)
                         return r;
         } else if (!path_equal(sc, agent))
@@ -1067,7 +1067,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
 
         sc = strstrip(contents);
         if (streq(sc, "0")) {
-                r = write_string_file(fs, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
+                r = write_string_file(fs, "1", 0);
                 if (r < 0)
                         return r;
 
@@ -1094,7 +1094,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "0", WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(fs, "0", 0);
         if (r < 0)
                 return r;
 
@@ -1104,7 +1104,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        r = write_string_file(fs, "", WRITE_STRING_FILE_DISABLE_BUFFER);
+        r = write_string_file(fs, "", 0);
         if (r < 0)
                 return r;
 
diff --git a/src/shared/coredump-util.c b/src/shared/coredump-util.c
index 805503f366..01a7ccb291 100644
index 805503f366..3234a1d76e 100644
--- a/src/shared/coredump-util.c
+++ b/src/shared/coredump-util.c
@@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) {
         xsprintf(t, "0x%"PRIx64, value);
 
         return write_string_file("/proc/self/coredump_filter", t,
-                                 WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER);
+                                 0);
 }
 
 /* Turn off core dumps but only if we're running outside of a container. */
@@ -173,7 +173,7 @@ void disable_coredumps(void) {
         if (detect_container() > 0)
                 return;


@@ 377,7 369,7 @@ index 805503f366..01a7ccb291 100644
                 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m");
 }
diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c
index 7c21157580..06ab74b04c 100644
index 1213fdc2c7..4c26e6a4ee 100644
--- a/src/shared/hibernate-util.c
+++ b/src/shared/hibernate-util.c
@@ -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
                 return log_error_errno(r,
                                        "Failed to write device '%s' (%s) to /sys/power/resume: %m",
diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c
index 1f88e724d0..feb18b320a 100644
index d0a79b2635..0c82d9943a 100644
--- a/src/shared/smack-util.c
+++ b/src/shared/smack-util.c
@@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) {


@@ 411,33 403,11 @@ index 1f88e724d0..feb18b320a 100644
         if (r < 0)
                 return r;
 
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
index 810c5b5206..be0d127ff3 100644
--- a/src/shared/watchdog.c
+++ b/src/shared/watchdog.c
@@ -93,7 +93,7 @@ static int watchdog_set_pretimeout_governor(const char *governor) {
 
         r = write_string_file(sys_fn,
                               governor,
-                              WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
+                              WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
         if (r < 0)
                 return log_error_errno(r, "Failed to set watchdog pretimeout_governor to '%s': %m", governor);
 
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 0402bb07f3..a6cbb45340 100644
index 181bb4ccef..2dbb3f4bc6 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -139,7 +139,7 @@ static int write_state(int fd, char * const *states) {
                 if (k < 0)
                         return RET_GATHER(r, k);
 
-                k = write_string_stream(f, *state, WRITE_STRING_FILE_DISABLE_BUFFER);
+                k = write_string_stream(f, *state, 0);
                 if (k >= 0) {
                         log_debug("Using sleep state '%s'.", *state);
                         return 0;
@@ -157,7 +157,7 @@ static int write_mode(const char *path, char * const *modes) {
@@ -158,7 +158,7 @@ static int write_mode(const char *path, char * const *modes) {
         assert(path);
 
         STRV_FOREACH(mode, modes) {


@@ 447,10 417,10 @@ index 0402bb07f3..a6cbb45340 100644
                         log_debug("Using sleep mode '%s' for %s.", *mode, path);
                         return 0;
diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c
index 1bb8eec316..cf9b4c4a21 100644
index ca8e886d37..5c27c54f09 100644
--- a/src/storagetm/storagetm.c
+++ b/src/storagetm/storagetm.c
@@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) {
@@ -197,7 +197,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) {
                                         if (!enable_fn)
                                                 return log_oom();
 


@@ 459,7 429,7 @@ index 1bb8eec316..cf9b4c4a21 100644
                                         if (r < 0)
                                                 log_warning_errno(r, "Failed to disable namespace '%s' of NVME subsystem '%s', ignoring: %m", e->d_name, s->name);
 
@@ -254,7 +254,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
@@ -265,7 +265,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
                 _cleanup_free_ char *truncated = strndup(w, 40); /* kernel refuses more than 40 chars (as per nvme spec) */
 
                 /* The default string stored in 'attr_model' is "Linux" btw. */


@@ 468,7 438,7 @@ index 1bb8eec316..cf9b4c4a21 100644
                 if (r < 0)
                         log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", w);
         }
@@ -268,7 +268,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
@@ -279,7 +279,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
                         return log_oom();
 
                  /* The default string stored in 'attr_firmware' is `uname -r` btw, but truncated to 8 chars. */


@@ 477,7 447,7 @@ index 1bb8eec316..cf9b4c4a21 100644
                 if (r < 0)
                         log_warning_errno(r, "Failed to set model of subsystem to '%s', ignoring: %m", truncated);
         }
@@ -295,7 +295,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
@@ -306,7 +306,7 @@ static int nvme_subsystem_write_metadata(int subsystem_fd, sd_device *device) {
                 if (!truncated)
                         return log_oom();
 


@@ 486,7 456,7 @@ index 1bb8eec316..cf9b4c4a21 100644
                 if (r < 0)
                         log_warning_errno(r, "Failed to set serial of subsystem to '%s', ignoring: %m", truncated);
         }
@@ -345,7 +345,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co
@@ -356,7 +356,7 @@ static int nvme_namespace_write_metadata(int namespace_fd, sd_device *device, co
                 id = id128_digest(j, l);
         }
 


@@ 495,7 465,7 @@ index 1bb8eec316..cf9b4c4a21 100644
         if (r < 0)
                 log_warning_errno(r, "Failed to set uuid of namespace to '%s', ignoring: %m", SD_ID128_TO_UUID_STRING(id));
 
@@ -408,7 +408,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
@@ -419,7 +419,7 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
         if (subsystem_fd < 0)
                 return log_error_errno(subsystem_fd, "Failed to create NVME subsystem '%s': %m", j);
 


@@ 504,7 474,7 @@ index 1bb8eec316..cf9b4c4a21 100644
         if (r < 0)
                 return log_error_errno(r, "Failed to set 'attr_allow_any_host' flag: %m");
 
@@ -423,11 +423,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
@@ -434,11 +434,11 @@ static int nvme_subsystem_add(const char *node, int consumed_fd, sd_device *devi
 
         /* We use /proc/$PID/fd/$FD rather than /proc/self/fd/$FD, because this string is visible to others
          * via configfs, and by including the PID it's clear to who the stuff belongs. */


@@ 518,7 488,7 @@ index 1bb8eec316..cf9b4c4a21 100644
         if (r < 0)
                 return log_error_errno(r, "Failed to write 'enable' attribute: %m");
 
@@ -557,19 +557,19 @@ static int nvme_port_add_portnr(
@@ -568,19 +568,19 @@ static int nvme_port_add_portnr(
                 return 0;
         }
 


@@ 542,18 512,6 @@ index 1bb8eec316..cf9b4c4a21 100644
         if (r < 0)
                 return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr);
 
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 581bbaf345..cdf648a2d1 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -2706,7 +2706,6 @@ static int udev_rule_apply_token_to_event(
                         log_event_debug(dev, token, "Writing ATTR{'%s'}=\"%s\".", buf, value);
                         r = write_string_file(buf, value,
                                               WRITE_STRING_FILE_VERIFY_ON_FAILURE |
-                                              WRITE_STRING_FILE_DISABLE_BUFFER |
                                               WRITE_STRING_FILE_AVOID_NEWLINE |
                                               WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE);
                         if (r < 0)
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index ba742dda69..6f20e81615 100644
--- a/src/vconsole/vconsole-setup.c


@@ 568,5 526,5 @@ index ba742dda69..6f20e81615 100644
                 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8));
 
-- 
2.45.1
2.34.1


R systemd/0015-Handle-__cpu_mask-usage.patch => systemd/0013-Handle-__cpu_mask-usage.patch +4 -4
@@ 1,7 1,7 @@
From c1cbec8571855b8480d56dcad2ab81aea0782bd4 Mon Sep 17 00:00:00 2001
From ab4fda874b26542de96720db58cb0e8704a40108 Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Fri, 13 Sep 2019 19:26:27 -0400
Subject: [PATCH 15/27] Handle __cpu_mask usage
Subject: [PATCH 13/26] Handle __cpu_mask usage

Fixes errors:



@@ 24,7 24,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h
index 618fe1b0a3..46c92077b0 100644
index 2c477d8a01..c026ce77a6 100644
--- a/src/shared/cpu-set-util.h
+++ b/src/shared/cpu-set-util.h
@@ -6,6 +6,8 @@


@@ 56,5 56,5 @@ index ea0c58770e..b65c0bd370 100644
 /* Print information about various types. Useful when diagnosing
  * gcc diagnostics on an unfamiliar architecture. */
-- 
2.45.1
2.34.1


R systemd/0016-Handle-missing-gshadow.patch => systemd/0014-Handle-missing-gshadow.patch +16 -16
@@ 1,7 1,7 @@
From 8b540d8240bbc3f917de9ca8d3b62f28c3424d91 Mon Sep 17 00:00:00 2001
From c5165f6adf8a9cfe8c0784c598b87d7d7e8b7d1a Mon Sep 17 00:00:00 2001
From: Alex Kiernan <alex.kiernan@gmail.com>
Date: Tue, 10 Mar 2020 11:05:20 +0000
Subject: [PATCH 16/27] Handle missing gshadow
Subject: [PATCH 14/26] Handle missing gshadow

gshadow usage is now present in the userdb code. Mask all uses of it to
allow compilation on musl


@@ 17,7 17,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c
index ffb5721466..4d01815c8c 100644
index 9223a2e6ca..f9eb1a5b64 100644
--- a/src/shared/user-record-nss.c
+++ b/src/shared/user-record-nss.c
@@ -286,8 +286,10 @@ int nss_group_to_group_record(


@@ 45,9 45,9 @@ index ffb5721466..4d01815c8c 100644
         }
+#endif
 
         r = json_build(&g->json, JSON_BUILD_OBJECT(
                                        JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)),
@@ -344,6 +348,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
         r = sd_json_buildo(
                         &g->json,
@@ -345,6 +349,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
         assert(ret_sgrp);
         assert(ret_buffer);
 


@@ 55,7 55,7 @@ index ffb5721466..4d01815c8c 100644
         for (;;) {
                 _cleanup_free_ char *buf = NULL;
                 struct sgrp sgrp, *result;
@@ -372,6 +377,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
@@ -373,6 +378,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re
                 buflen *= 2;
                 buf = mfree(buf);
         }


@@ 65,7 65,7 @@ index ffb5721466..4d01815c8c 100644
 }
 
 int nss_group_record_by_name(
@@ -382,7 +390,9 @@ int nss_group_record_by_name(
@@ -383,7 +391,9 @@ int nss_group_record_by_name(
         _cleanup_free_ char *sbuf = NULL;
         _cleanup_free_ struct group *result = NULL;
         bool incomplete = false;


@@ 75,7 75,7 @@ index ffb5721466..4d01815c8c 100644
         int r;
 
         assert(name);
@@ -391,6 +401,7 @@ int nss_group_record_by_name(
@@ -392,6 +402,7 @@ int nss_group_record_by_name(
         if (r < 0)
                 return r;
 


@@ 83,7 83,7 @@ index ffb5721466..4d01815c8c 100644
         if (with_shadow) {
                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
                 if (r < 0) {
@@ -402,6 +413,9 @@ int nss_group_record_by_name(
@@ -403,6 +414,9 @@ int nss_group_record_by_name(
                 incomplete = true;
 
         r = nss_group_to_group_record(result, sresult, ret);


@@ 93,7 93,7 @@ index ffb5721466..4d01815c8c 100644
         if (r < 0)
                 return r;
 
@@ -418,13 +432,16 @@ int nss_group_record_by_gid(
@@ -419,13 +433,16 @@ int nss_group_record_by_gid(
         _cleanup_free_ char *sbuf = NULL;
         _cleanup_free_ struct group *result = NULL;
         bool incomplete = false;


@@ 110,7 110,7 @@ index ffb5721466..4d01815c8c 100644
         if (with_shadow) {
                 r = nss_sgrp_for_group(result, &sgrp, &sbuf);
                 if (r < 0) {
@@ -436,6 +453,9 @@ int nss_group_record_by_gid(
@@ -437,6 +454,9 @@ int nss_group_record_by_gid(
                 incomplete = true;
 
         r = nss_group_to_group_record(result, sresult, ret);


@@ 137,10 137,10 @@ index 22ab04d6ee..4e52e7a911 100644
 #include <shadow.h>
 
diff --git a/src/shared/userdb.c b/src/shared/userdb.c
index 75dece3442..5628e1410f 100644
index ff83d4bf90..54d36cc706 100644
--- a/src/shared/userdb.c
+++ b/src/shared/userdb.c
@@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
@@ -1041,13 +1041,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
                 if (gr) {
                         _cleanup_free_ char *buffer = NULL;
                         bool incomplete = false;


@@ 157,7 157,7 @@ index 75dece3442..5628e1410f 100644
                         if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) {
                                 r = nss_sgrp_for_group(gr, &sgrp, &buffer);
                                 if (r < 0) {
@@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
@@ -1060,6 +1062,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) {
                         }
 
                         r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret);


@@ 168,5 168,5 @@ index 75dece3442..5628e1410f 100644
                                 return r;
 
-- 
2.45.1
2.34.1


R systemd/0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch => systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +6 -6
@@ 1,7 1,7 @@
From 45bb63a1727097683acad23f270968026671ec6a Mon Sep 17 00:00:00 2001
From ef9ad83759f78de983d2d7c4f95bc48b83bb8f66 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 12 Apr 2021 23:44:53 -0700
Subject: [PATCH 17/27] missing_syscall.h: Define MIPS ABI defines for musl
Subject: [PATCH 15/26] missing_syscall.h: Define MIPS ABI defines for musl

musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64
unlike glibc where these are provided by libc headers, therefore define


@@ 16,7 16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 2 files changed, 7 insertions(+)

diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index 86280771c4..20d05db506 100644
index e2cd8b4e35..f2fe489de7 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -20,6 +20,12 @@


@@ 31,9 31,9 @@ index 86280771c4..20d05db506 100644
+
 #include "macro.h"
 #include "missing_keyctl.h"
 #include "missing_stat.h"
 #include "missing_sched.h"
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index 67aa8ea1f2..8d9824495e 100644
index 389c77eee0..e3627c4603 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -20,6 +20,7 @@


@@ 45,5 45,5 @@ index 67aa8ea1f2..8d9824495e 100644
 typedef struct BaseFilesystem {
         const char *dir;      /* directory or symlink to create */
-- 
2.45.1
2.34.1


R systemd/0018-pass-correct-parameters-to-getdents64.patch => systemd/0016-pass-correct-parameters-to-getdents64.patch +4 -4
@@ 1,7 1,7 @@
From 78a59a540d425e677d5652d9b72d7b175e36f4dd Mon Sep 17 00:00:00 2001
From 9079b158779a9c395c24f882f72a1c734795045d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 15:15:11 -0800
Subject: [PATCH 18/27] pass correct parameters to getdents64
Subject: [PATCH 16/26] pass correct parameters to getdents64

Fixes
../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>
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c
index 776733148b..d37419658c 100644
index 378fd92b06..5b567b457d 100644
--- a/src/basic/recurse-dir.c
+++ b/src/basic/recurse-dir.c
@@ -56,7 +56,7 @@ int readdir_all(int dir_fd,


@@ 33,5 33,5 @@ index 776733148b..d37419658c 100644
                         return -errno;
                 if (n == 0)
-- 
2.45.1
2.34.1


R systemd/0019-Adjust-for-musl-headers.patch => systemd/0017-Adjust-for-musl-headers.patch +50 -50
@@ 1,7 1,7 @@
From 585e04673da62a8bf50e00fd6c1ae9ffc66c3b2f Mon Sep 17 00:00:00 2001
From be9d8f221ab9d31c0df8b2b3e66172bb9bc0f71f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 21 Jan 2022 22:19:37 -0800
Subject: [PATCH 19/27] Adjust for musl headers
Subject: [PATCH 17/26] Adjust for musl headers

Upstream-Status: Inappropriate [musl specific]



@@ 10,6 10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
[Rebased for v255.1]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/basic/linux/ethtool.h                     | 3 ++-
 src/libsystemd-network/sd-dhcp6-client.c      | 2 +-
 src/network/netdev/bareudp.c                  | 2 +-
 src/network/netdev/batadv.c                   | 2 +-


@@ 43,11 44,24 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 src/network/networkd-ndisc.c                  | 2 +-
 src/network/networkd-setlink.c                | 2 +-
 src/network/networkd-sysctl.c                 | 2 +-
 src/shared/linux/ethtool.h                    | 3 ++-
 src/shared/netif-util.c                       | 2 +-
 src/udev/udev-builtin-net_id.c                | 2 +-
 36 files changed, 40 insertions(+), 36 deletions(-)

diff --git a/src/basic/linux/ethtool.h b/src/basic/linux/ethtool.h
index a32293ba20..2aad67e9c0 100644
--- a/src/basic/linux/ethtool.h
+++ b/src/basic/linux/ethtool.h
@@ -16,7 +16,8 @@
 
 #include <linux/const.h>
 #include <linux/types.h>
-#include <linux/if_ether.h>
+#include <netinet/if_ether.h>
+//#include <linux/if_ether.h>
 
 #include <limits.h> /* for INT_MAX */
 
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index 3e992d7cad..c7e1ff4dbf 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c


@@ 62,7 76,7 @@ index 3e992d7cad..c7e1ff4dbf 100644
 
 #include "sd-dhcp6-client.h"
diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c
index 1df886573b..c8b6714726 100644
index e122abd97f..c120c2969b 100644
--- a/src/network/netdev/bareudp.c
+++ b/src/network/netdev/bareudp.c
@@ -2,7 +2,7 @@


@@ 75,7 89,7 @@ index 1df886573b..c8b6714726 100644
 #include "bareudp.h"
 #include "netlink-util.h"
diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c
index 26da0231d4..2e8002af8c 100644
index 9806d8eb7c..19c3d881c2 100644
--- a/src/network/netdev/batadv.c
+++ b/src/network/netdev/batadv.c
@@ -3,7 +3,7 @@


@@ 88,7 102,7 @@ index 26da0231d4..2e8002af8c 100644
 #include "batadv.h"
 #include "fileio.h"
diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c
index 52a7f126b6..74ca0812db 100644
index b866940b7a..a0eaf0a866 100644
--- a/src/network/netdev/bond.c
+++ b/src/network/netdev/bond.c
@@ -1,7 +1,7 @@


@@ 101,7 115,7 @@ index 52a7f126b6..74ca0812db 100644
 #include "alloc-util.h"
 #include "bond.h"
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
index d426c0c501..14432adb95 100644
index d3ba4989d9..4f7301c4f1 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -2,7 +2,8 @@


@@ 115,7 129,7 @@ index d426c0c501..14432adb95 100644
 #include <netinet/in.h>
 
diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c
index 00df1d2787..77b506b422 100644
index 8b2893d5b4..412123f036 100644
--- a/src/network/netdev/dummy.c
+++ b/src/network/netdev/dummy.c
@@ -1,6 +1,6 @@


@@ 127,7 141,7 @@ index 00df1d2787..77b506b422 100644
 #include "dummy.h"
 
diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c
index 22c2b00e1b..1d762c4911 100644
index 1d68be9bc8..539151c49e 100644
--- a/src/network/netdev/geneve.c
+++ b/src/network/netdev/geneve.c
@@ -2,7 +2,7 @@


@@ 153,7 167,7 @@ index d7ff44cb9e..e037629ae4 100644
 #include "ifb.h"
 
diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c
index d5fe299b7b..c9c8002eac 100644
index 6932c62e2a..fc458da9e8 100644
--- a/src/network/netdev/ipoib.c
+++ b/src/network/netdev/ipoib.c
@@ -1,6 +1,6 @@


@@ 165,7 179,7 @@ index d5fe299b7b..c9c8002eac 100644
 
 #include "ipoib.h"
diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c
index 51ae64341d..46460efabd 100644
index 6e50f72aaa..49acfee25e 100644
--- a/src/network/netdev/ipvlan.c
+++ b/src/network/netdev/ipvlan.c
@@ -3,7 +3,7 @@


@@ 178,7 192,7 @@ index 51ae64341d..46460efabd 100644
 #include "conf-parser.h"
 #include "ipvlan.h"
diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c
index 4b9f19cc95..6c4951a7e6 100644
index 6dd434f803..f9fbe9f51a 100644
--- a/src/network/netdev/macsec.c
+++ b/src/network/netdev/macsec.c
@@ -1,7 +1,7 @@


@@ 191,7 205,7 @@ index 4b9f19cc95..6c4951a7e6 100644
 #include <linux/if_macsec.h>
 #include <linux/genetlink.h>
diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c
index 21933d3970..a4ace19dc6 100644
index fd112b58e1..b038740bda 100644
--- a/src/network/netdev/macvlan.c
+++ b/src/network/netdev/macvlan.c
@@ -3,7 +3,7 @@


@@ 204,7 218,7 @@ index 21933d3970..a4ace19dc6 100644
 #include "conf-parser.h"
 #include "macvlan.h"
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 2b411425ba..fe00200135 100644
index c2986aafb5..147f1c95d0 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -3,7 +3,7 @@


@@ 217,7 231,7 @@ index 2b411425ba..fe00200135 100644
 
 #include "alloc-util.h"
diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c
index 15d5c132f9..a3ffa48b15 100644
index 59958c3bbe..61169016b0 100644
--- a/src/network/netdev/netdevsim.c
+++ b/src/network/netdev/netdevsim.c
@@ -1,6 +1,6 @@


@@ 241,7 255,7 @@ index ff372092e6..eef66811f4 100644
 #include "nlmon.h"
 
diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c
index db84e7cf6e..93d5642962 100644
index af05cfda81..f659bed3a6 100644
--- a/src/network/netdev/tunnel.c
+++ b/src/network/netdev/tunnel.c
@@ -2,7 +2,7 @@


@@ 266,7 280,7 @@ index 380547ee1e..137c1adf8a 100644
 #include "vcan.h"
 
diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c
index 78555286d1..e7eff072e4 100644
index 54d3b59734..f3f75e22b5 100644
--- a/src/network/netdev/veth.c
+++ b/src/network/netdev/veth.c
@@ -3,7 +3,7 @@


@@ 292,7 306,7 @@ index 60e49a5b8a..266fd58813 100644
 
 #include "parse-util.h"
diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c
index 24079a7203..33ff17ea82 100644
index c35419f859..4d1d3ef141 100644
--- a/src/network/netdev/vrf.c
+++ b/src/network/netdev/vrf.c
@@ -2,8 +2,8 @@


@@ 306,7 320,7 @@ index 24079a7203..33ff17ea82 100644
 #include "vrf.h"
 
diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c
index c0343f45b6..f9e718f40b 100644
index 2de89b8e24..ce1b8f9b69 100644
--- a/src/network/netdev/vxcan.c
+++ b/src/network/netdev/vxcan.c
@@ -1,7 +1,7 @@


@@ 319,7 333,7 @@ index c0343f45b6..f9e718f40b 100644
 #include "vxcan.h"
 
diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c
index 37f65967a6..bdd8848a02 100644
index d8a066370d..8f94eeb763 100644
--- a/src/network/netdev/vxlan.c
+++ b/src/network/netdev/vxlan.c
@@ -3,7 +3,7 @@


@@ 332,7 346,7 @@ index 37f65967a6..bdd8848a02 100644
 #include "conf-parser.h"
 #include "alloc-util.h"
diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
index fed1be8d11..94b659fd23 100644
index 8d1dddf828..5182783f45 100644
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -5,7 +5,7 @@


@@ 357,7 371,7 @@ index 905bfc0bdf..39e34dbb3b 100644
 #include "missing_network.h"
 #include "xfrm.h"
diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c
index 9f0268d934..8cd605ab4a 100644
index 8b64dfe8f0..caa2885728 100644
--- a/src/network/networkd-dhcp-common.c
+++ b/src/network/networkd-dhcp-common.c
@@ -1,7 +1,8 @@


@@ 371,7 385,7 @@ index 9f0268d934..8cd605ab4a 100644
 #include "bus-error.h"
 #include "bus-locator.h"
diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c
index 2e660b7763..b8dd6240a0 100644
index 16426de981..3d8efc05f1 100644
--- a/src/network/networkd-dhcp-prefix-delegation.c
+++ b/src/network/networkd-dhcp-prefix-delegation.c
@@ -1,6 +1,5 @@


@@ 381,7 395,7 @@ index 2e660b7763..b8dd6240a0 100644
 
 #include "dhcp6-lease-internal.h"
 #include "hashmap.h"
@@ -20,6 +19,8 @@
@@ -21,6 +20,8 @@
 #include "strv.h"
 #include "tunnel.h"
 


@@ 404,7 418,7 @@ index c35102af74..3be469ae16 100644
 
 #include "sd-dhcp-server.h"
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 4dd6044b18..15a598f9db 100644
index d94ac1a213..b8fe82cb6a 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -3,7 +3,7 @@


@@ 415,9 429,9 @@ index 4dd6044b18..15a598f9db 100644
+//#include <linux/if_arp.h>
 
 #include "alloc-util.h"
 #include "dhcp-client-internal.h"
 #include "device-private.h"
diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c
index 32229a3fc7..662a345d6e 100644
index 04f51ab530..c4580754f7 100644
--- a/src/network/networkd-ipv6ll.c
+++ b/src/network/networkd-ipv6ll.c
@@ -1,7 +1,7 @@


@@ 430,7 444,7 @@ index 32229a3fc7..662a345d6e 100644
 #include "in-addr-util.h"
 #include "networkd-address.h"
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 6b0f09926a..81f44f6e6a 100644
index 3c042e6c18..05fe2cb900 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -4,7 +4,7 @@


@@ 443,7 457,7 @@ index 6b0f09926a..81f44f6e6a 100644
 #include <linux/netdevice.h>
 #include <sys/socket.h>
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 7cafe1f6a3..07c293c9a6 100644
index 33e86fb04e..51292871fc 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -6,7 +6,7 @@


@@ 456,7 470,7 @@ index 7cafe1f6a3..07c293c9a6 100644
 #include "sd-ndisc.h"
 
diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c
index 058bc00ba1..bb0a430a0b 100644
index 8519e6e7a0..7aca2bbecc 100644
--- a/src/network/networkd-setlink.c
+++ b/src/network/networkd-setlink.c
@@ -2,7 +2,7 @@


@@ 466,10 480,10 @@ index 058bc00ba1..bb0a430a0b 100644
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 #include <linux/if_bridge.h>
 #include <linux/ipv6.h>
 
 #include "missing_network.h"
diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c
index 68c23e0eb7..e177c49d9b 100644
index 10a35bc44b..84c6b68ee4 100644
--- a/src/network/networkd-sysctl.c
+++ b/src/network/networkd-sysctl.c
@@ -2,7 +2,7 @@


@@ 479,24 493,10 @@ index 68c23e0eb7..e177c49d9b 100644
-#include <linux/if_arp.h>
+//#include <linux/if_arp.h>
 
 #include "af-list.h"
 #include "missing_network.h"
diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h
index 3d1da515c0..3fca9a4faf 100644
--- a/src/shared/linux/ethtool.h
+++ b/src/shared/linux/ethtool.h
@@ -16,7 +16,8 @@
 
 #include <linux/const.h>
 #include <linux/types.h>
-#include <linux/if_ether.h>
+#include <netinet/if_ether.h>
+//#include <linux/if_ether.h>
 
 #include <limits.h> /* for INT_MAX */
 #include "sd-messages.h"
 
diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c
index 8adc2c89c8..1977e28d7f 100644
index 978ce42341..899b5f613f 100644
--- a/src/shared/netif-util.c
+++ b/src/shared/netif-util.c
@@ -1,7 +1,7 @@


@@ 509,7 509,7 @@ index 8adc2c89c8..1977e28d7f 100644
 #include "arphrd-util.h"
 #include "device-util.h"
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 384a1f31cb..c94bb70afb 100644
index 09c04b9a7f..4686897dbf 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -19,7 +19,7 @@


@@ 522,5 522,5 @@ index 384a1f31cb..c94bb70afb 100644
 #include <linux/pci_regs.h>
 
-- 
2.45.1
2.34.1


R systemd/0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch => systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch +3 -3
@@ 1,7 1,7 @@
From e01f0c444423eb65d176713735ff8cefb3068f3d Mon Sep 17 00:00:00 2001
From 349f9a0f9ecfc6575a3d9eeaffe89536e6a43914 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 8 Nov 2022 13:31:34 -0800
Subject: [PATCH 20/27] test-bus-error: strerror() is assumed to be GNU
Subject: [PATCH 18/26] test-bus-error: strerror() is assumed to be GNU
 specific version mark it so

Upstream-Status: Inappropriate [Upstream systemd only supports glibc]


@@ 48,5 48,5 @@ index ab463bd1b3..e2ebcaaf33 100644
 TEST(PROTECT_ERRNO) {
         errno = 12;
-- 
2.45.1
2.34.1


R systemd/0021-errno-util-Make-STRERROR-portable-for-musl.patch => systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch +3 -3
@@ 1,7 1,7 @@
From d2f632dd6a8cca0fbdd6568ce84004335c004f58 Mon Sep 17 00:00:00 2001
From 28fa1d5f56c6ddee9e336e6f2051c55e9f2f98b4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 23 Jan 2023 23:39:46 -0800
Subject: [PATCH 21/27] errno-util: Make STRERROR portable for musl
Subject: [PATCH 19/26] errno-util: Make STRERROR portable for musl

Sadly, systemd has decided to use yet another GNU extention in a macro
lets make this such that we can use XSI compliant strerror_r() for


@@ 38,5 38,5 @@ index 48b76e4bf7..6e7653e2d9 100644
  * Note that we can't use ({ … }) to define a temporary variable, so errnum is
  * evaluated twice. */
-- 
2.45.1
2.34.1


R systemd/0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch => systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch +6 -6
@@ 1,7 1,7 @@
From 4a3ed5aaaf108d3a07f24997698906e801ba2412 Mon Sep 17 00:00:00 2001
From 66de8a53849f76f5596327c38ae5f002b9f534cd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 2 Aug 2023 12:06:27 -0700
Subject: [PATCH 22/27] sd-event: Make malloc_trim() conditional on glibc
Subject: [PATCH 20/26] sd-event: Make malloc_trim() conditional on glibc

musl does not have this API



@@ 12,10 12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index a1305ef014..b8a73da2a3 100644
index 7aea7d2581..d3f4001f53 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -1877,7 +1877,7 @@ _public_ int sd_event_add_exit(
@@ -1881,7 +1881,7 @@ _public_ int sd_event_add_exit(
 }
 
 _public_ int sd_event_trim_memory(void) {


@@ 24,7 24,7 @@ index a1305ef014..b8a73da2a3 100644
 
         /* A default implementation of a memory pressure callback. Simply releases our own allocation caches
          * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a
@@ -1891,7 +1891,9 @@ _public_ int sd_event_trim_memory(void) {
@@ -1895,7 +1895,9 @@ _public_ int sd_event_trim_memory(void) {
 
         usec_t before_timestamp = now(CLOCK_MONOTONIC);
         hashmap_trim_pools();


@@ 35,5 35,5 @@ index a1305ef014..b8a73da2a3 100644
 
         if (r > 0)
-- 
2.45.1
2.34.1


R systemd/0023-shared-Do-not-use-malloc_info-on-musl.patch => systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch +5 -5
@@ 1,7 1,7 @@
From d3880d167d8dfafbb8ee62f7737a869f9525f303 Mon Sep 17 00:00:00 2001
From 93d13363c605fb2de484f38f3726f8fbad1c3540 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 2 Aug 2023 12:20:40 -0700
Subject: [PATCH 23/27] shared: Do not use malloc_info on musl
Subject: [PATCH 21/26] shared: Do not use malloc_info on musl

Upstream-Status: Inappropriate [musl-specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>


@@ 11,10 11,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 30f9602b1e..5308f168db 100644
index ff80e580fc..a628a29d0c 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -755,15 +755,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat
@@ -787,15 +787,16 @@ static int method_dump_memory_state_by_fd(sd_bus_message *message, void *userdat
         _cleanup_close_ int fd = -EBADF;
         size_t dump_size;
         FILE *f;


@@ 53,5 53,5 @@ index 8e70e365dd..9e782caec9 100644
                 break;
         }
-- 
2.45.1
2.34.1


R systemd/0024-avoid-missing-LOCK_EX-declaration.patch => systemd/0022-avoid-missing-LOCK_EX-declaration.patch +8 -8
@@ 1,7 1,7 @@
From ca2a736627f8ee8dd9dbbf5b3149d4c8493833ff Mon Sep 17 00:00:00 2001
From 5b8df64993b68a5a4af0f214d8cae77f4e716593 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jan 2024 11:03:27 +0800
Subject: [PATCH 24/27] avoid missing LOCK_EX declaration
Subject: [PATCH 22/26] avoid missing LOCK_EX declaration

This only happens on MUSL. Include sys/file.h to avoid compilation
error about missing LOCK_EX declaration.


@@ 16,7 16,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 3 files changed, 3 insertions(+)

diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index af17481dd8..fa20bfa30f 100644
index 93b254c680..5f0b1a816d 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -6,6 +6,7 @@


@@ 28,10 28,10 @@ index af17481dd8..fa20bfa30f 100644
 #include "macro.h"
 #include "missing_fcntl.h"
diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c
index ee8db04e76..2aff654f0f 100644
index 9d636f5529..6be43caa57 100644
--- a/src/core/exec-invoke.c
+++ b/src/core/exec-invoke.c
@@ -4,6 +4,7 @@
@@ -5,6 +5,7 @@
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <sys/prctl.h>


@@ 40,7 40,7 @@ index ee8db04e76..2aff654f0f 100644
 #if HAVE_PAM
 #include <security/pam_appl.h>
diff --git a/src/shared/dev-setup.h b/src/shared/dev-setup.h
index 5339bc4e5e..0697495f23 100644
index 92ba6cf764..ba01a0ae55 100644
--- a/src/shared/dev-setup.h
+++ b/src/shared/dev-setup.h
@@ -2,6 +2,7 @@


@@ 49,8 49,8 @@ index 5339bc4e5e..0697495f23 100644
 #include <sys/types.h>
+#include <sys/file.h>
 
 int lock_dev_console(void);
 int dev_setup(const char *prefix, uid_t uid, gid_t gid);
 
-- 
2.45.1
2.34.1


R systemd/0025-include-signal.h-to-avoid-the-undeclared-error.patch => systemd/0023-include-signal.h-to-avoid-the-undeclared-error.patch +8 -8
@@ 1,7 1,7 @@
From ecf124ab2e488a71741fe443ff4863f7ed172968 Mon Sep 17 00:00:00 2001
From e39afec7e5a2f3a9de7202affab4d0340ba879d7 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jul 2024 22:18:47 -0700
Subject: [PATCH 25/27] include signal.h to avoid the 'undeclared' error
Subject: [PATCH 23/26] include signal.h to avoid the 'undeclared' error

Upstream-Status: Inappropriate [musl specific]



@@ 11,17 11,17 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 1 file changed, 1 insertion(+)

diff --git a/src/basic/pidref.h b/src/basic/pidref.h
index 9920ebb9b3..2fdd4ff50f 100644
index 42ddf4e50b..b9cf53680f 100644
--- a/src/basic/pidref.h
+++ b/src/basic/pidref.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
@@ -3,6 +3,7 @@
 
 typedef struct PidRef PidRef;
 
+#include <signal.h>
 #include "macro.h"
 #include "process-util.h"
 
 /* An embeddable structure carrying a reference to a process. Supposed to be used when tracking processes continuously. */
-- 
2.45.1
2.34.1


R systemd/0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch => systemd/0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch +5 -5
@@ 1,7 1,7 @@
From 787606c6ff822fb3fe41ba951ee289bbf6d4def3 Mon Sep 17 00:00:00 2001
From 5a4334fde21b896cd75b2d1a56e06a4f365e9c4d Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jul 2024 22:44:31 -0700
Subject: [PATCH 26/27] undef stdin for references using stdin as a struct
Subject: [PATCH 24/26] undef stdin for references using stdin as a struct
 member

In musl stdio.h, we have:


@@ 18,7 18,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 2 files changed, 4 insertions(+)

diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c
index cfb2828f4e..1794a7b269 100644
index e37609c2e1..1b212ae7b4 100644
--- a/src/shared/edit-util.c
+++ b/src/shared/edit-util.c
@@ -3,6 +3,8 @@


@@ 31,7 31,7 @@ index cfb2828f4e..1794a7b269 100644
 #include "copy.h"
 #include "edit-util.h"
diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index 15398f8364..e7d53ca9a1 100644
index c42a31153d..7695ceeead 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -13,6 +13,8 @@


@@ 44,5 44,5 @@ index 15398f8364..e7d53ca9a1 100644
         _cleanup_hashmap_free_ Hashmap *cached_id_map = NULL, *cached_name_map = NULL;
         _cleanup_(lookup_paths_done) LookupPaths lp = {};
-- 
2.45.1
2.34.1


A systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch => systemd/0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch +288 -0
@@ 0,0 1,288 @@
From a90044320eecda424ed678d283ef60806c70fcda Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jul 2024 23:23:57 -0700
Subject: [PATCH 25/26] adjust header inclusion order to avoid redeclaration

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/basic/parse-util.c                | 3 ++-
 src/libsystemd-network/ndisc-option.c | 6 +++---
 src/libsystemd-network/sd-radv.c      | 5 +++--
 src/network/netdev/l2tp-tunnel.c      | 9 ++++-----
 src/network/netdev/l2tp-tunnel.h      | 6 +++---
 src/network/netdev/wireguard.c        | 2 +-
 src/network/networkctl-link-info.c    | 4 ++--
 src/network/networkd-bridge-mdb.c     | 3 ++-
 src/network/networkd-route.c          | 8 ++++----
 src/resolve/resolved-dns-stream.c     | 5 +++--
 src/resolve/resolved-manager.c        | 5 +++--
 src/shared/conf-parser.c              | 3 ++-
 12 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
index faa5344921..0fc9d12c89 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
@@ -2,7 +2,6 @@
 
 #include <errno.h>
 #include <inttypes.h>
-#include <linux/ipv6.h>
 #include <net/if.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -20,6 +19,8 @@
 #include "string-util.h"
 #include "strv.h"
 
+#include <linux/ipv6.h>
+
 int parse_boolean(const char *v) {
         if (!v)
                 return -EINVAL;
diff --git a/src/libsystemd-network/ndisc-option.c b/src/libsystemd-network/ndisc-option.c
index 3aab51f51b..feeb4c78e5 100644
--- a/src/libsystemd-network/ndisc-option.c
+++ b/src/libsystemd-network/ndisc-option.c
@@ -1,8 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/ipv6.h>
-#include <netinet/icmp6.h>
-
 #include "dns-resolver-internal.h"
 #include "dns-domain.h"
 #include "ether-addr-util.h"
@@ -16,6 +13,9 @@
 #include "strv.h"
 #include "unaligned.h"
 
+#include <linux/ipv6.h>
+#include <netinet/icmp6.h>
+
 /* RFC does not say anything about the maximum number of options, but let's limit the number of options for
  * safety. Typically, the number of options in an ICMPv6 message should be only a few. */
 #define MAX_OPTIONS 128
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c
index f241929ad5..7cef3c3f71 100644
--- a/src/libsystemd-network/sd-radv.c
+++ b/src/libsystemd-network/sd-radv.c
@@ -3,8 +3,6 @@
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
 
-#include <linux/ipv6.h>
-#include <netinet/icmp6.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
@@ -29,6 +27,9 @@
 #include "strv.h"
 #include "unaligned.h"
 
+#include <linux/ipv6.h>
+#include <netinet/icmp6.h>
+
 int sd_radv_new(sd_radv **ret) {
         _cleanup_(sd_radv_unrefp) sd_radv *ra = NULL;
 
diff --git a/src/network/netdev/l2tp-tunnel.c b/src/network/netdev/l2tp-tunnel.c
index c87e44797b..437b40c114 100644
--- a/src/network/netdev/l2tp-tunnel.c
+++ b/src/network/netdev/l2tp-tunnel.c
@@ -1,10 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <netinet/in.h>
-#include <linux/if_arp.h>
-#include <linux/l2tp.h>
-#include <linux/genetlink.h>
-
 #include "conf-parser.h"
 #include "hashmap.h"
 #include "l2tp-tunnel.h"
@@ -17,6 +12,10 @@
 #include "string-table.h"
 #include "string-util.h"
 
+#include <netinet/in.h>
+#include <linux/l2tp.h>
+#include <linux/genetlink.h>
+
 static const char* const l2tp_l2spec_type_table[_NETDEV_L2TP_L2SPECTYPE_MAX] = {
         [NETDEV_L2TP_L2SPECTYPE_NONE]    = "none",
         [NETDEV_L2TP_L2SPECTYPE_DEFAULT] = "default",
diff --git a/src/network/netdev/l2tp-tunnel.h b/src/network/netdev/l2tp-tunnel.h
index c558ed49de..8419ef34c5 100644
--- a/src/network/netdev/l2tp-tunnel.h
+++ b/src/network/netdev/l2tp-tunnel.h
@@ -1,13 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <netinet/in.h>
-#include <linux/l2tp.h>
-
 #include "in-addr-util.h"
 #include "netdev.h"
 #include "networkd-util.h"
 
+#include <netinet/in.h>
+#include <linux/l2tp.h>
+
 typedef enum L2tpL2specType {
         NETDEV_L2TP_L2SPECTYPE_NONE = L2TP_L2SPECTYPE_NONE,
         NETDEV_L2TP_L2SPECTYPE_DEFAULT = L2TP_L2SPECTYPE_DEFAULT,
diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
index 5182783f45..79b21cb4ba 100644
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -5,9 +5,9 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
+#include <netinet/in.h>
 //#include <linux/if_arp.h>
 #include <linux/ipv6_route.h>
-#include <netinet/in.h>
 #include <sys/ioctl.h>
 
 #include "sd-resolve.h"
diff --git a/src/network/networkctl-link-info.c b/src/network/networkctl-link-info.c
index f356d3c231..216c442de1 100644
--- a/src/network/networkctl-link-info.c
+++ b/src/network/networkctl-link-info.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_tunnel.h>
-
 #include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
@@ -16,6 +14,8 @@
 #include "strxcpyx.h"
 #include "wifi-util.h"
 
+#include <linux/if_tunnel.h>
+
 /* use 128 kB for receive socket kernel queue, we shouldn't need more here */
 #define RCVBUF_SIZE    (128*1024)
 
diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
index 358ca4d294..fe87f7c093 100644
--- a/src/network/networkd-bridge-mdb.c
+++ b/src/network/networkd-bridge-mdb.c
@@ -2,7 +2,6 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_bridge.h>
 
 #include "netlink-util.h"
 #include "networkd-bridge-mdb.h"
@@ -13,6 +12,8 @@
 #include "string-util.h"
 #include "vlan-util.h"
 
+#include <linux/if_bridge.h>
+
 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
 
 /* remove MDB entry. */
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 0f3f79ec4f..325743bebf 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
-#include <linux/ipv6_route.h>
-#include <linux/nexthop.h>
-
 #include "alloc-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
@@ -21,6 +17,10 @@
 #include "vrf.h"
 #include "wireguard.h"
 
+#include <linux/if.h>
+#include <linux/ipv6_route.h>
+#include <linux/nexthop.h>
+
 static Route* route_detach_impl(Route *route) {
         assert(route);
         assert(!!route->network + !!route->manager + !!route->wireguard <= 1);
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c
index e57af66221..f66d8f0606 100644
--- a/src/resolve/resolved-dns-stream.c
+++ b/src/resolve/resolved-dns-stream.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if_arp.h>
-#include <netinet/tcp.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -12,6 +10,9 @@
 #include "resolved-dns-stream.h"
 #include "resolved-manager.h"
 
+//#include <linux/if_arp.h>
+#include <netinet/tcp.h>
+
 #define DNS_STREAMS_MAX 128
 
 #define DNS_QUERIES_PER_STREAM 32
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index dbaad81734..b988e75851 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -1,8 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
-#include <linux/ipv6.h>
-#include <netinet/in.h>
 #include <poll.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
@@ -46,6 +44,9 @@
 #include "utf8.h"
 #include "varlink-util.h"
 
+#include <linux/ipv6.h>
+#include <netinet/in.h>
+
 #define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
 
 static int manager_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) {
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index eaa8a5f11c..03379e7474 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -2,7 +2,6 @@
 
 #include <errno.h>
 #include <limits.h>
-#include <linux/ipv6.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -47,6 +46,8 @@
 #include "time-util.h"
 #include "utf8.h"
 
+#include <linux/ipv6.h>
+
 DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(config_file_hash_ops_fclose,
                                               char, path_hash_func, path_compare,
                                               FILE, safe_fclose);
-- 
2.34.1


R systemd/0028-build-path.c-avoid-boot-time-segfault-for-musl.patch => systemd/0026-build-path.c-avoid-boot-time-segfault-for-musl.patch +3 -3
@@ 1,7 1,7 @@
From 0e4379088b1cf607b605b785f6f23943ebeb6584 Mon Sep 17 00:00:00 2001
From f2a7cf1d2a2bc2516a180809efd85c828cd9c7f4 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Wed, 3 Jul 2024 07:18:42 -0700
Subject: [PATCH 28/28] build-path.c: avoid boot time segfault for musl
Subject: [PATCH 26/26] build-path.c: avoid boot time segfault for musl

This function, at runtime, should return -ENOEXEC. For musl, it
somehow segfaults. I think it's related to getauxval, but it's


@@ 27,5 27,5 @@ index b5972658df..4ef551034e 100644
                 const char *runpath = NULL;
 
-- 
2.45.1
2.34.1


D systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch => systemd/0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch +0 -76
@@ 1,76 0,0 @@
From cf94d43572770007f95b832f477aa5a03624a1e5 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Tue, 2 Jul 2024 23:23:57 -0700
Subject: [PATCH 27/27] adjust header inclusion order to avoid redeclaration

Upstream-Status: Inappropriate [musl specific]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 src/network/netdev/wireguard.c    | 2 +-
 src/network/networkd-bridge-mdb.c | 3 ++-
 src/network/networkd-route.c      | 6 +++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c
index 94b659fd23..a78ad5762d 100644
--- a/src/network/netdev/wireguard.c
+++ b/src/network/netdev/wireguard.c
@@ -5,9 +5,9 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
+#include <netinet/in.h>
 //#include <linux/if_arp.h>
 #include <linux/ipv6_route.h>
-#include <netinet/in.h>
 #include <sys/ioctl.h>
 
 #include "sd-resolve.h"
diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c
index 7ff4a18846..fe1a9cf888 100644
--- a/src/network/networkd-bridge-mdb.c
+++ b/src/network/networkd-bridge-mdb.c
@@ -2,7 +2,6 @@
 
 /* Make sure the net/if.h header is included before any linux/ one */
 #include <net/if.h>
-#include <linux/if_bridge.h>
 
 #include "netlink-util.h"
 #include "networkd-bridge-mdb.h"
@@ -13,6 +12,8 @@
 #include "string-util.h"
 #include "vlan-util.h"
 
+#include <linux/if_bridge.h>
+
 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U
 
 /* remove MDB entry. */
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index d596fd81e6..0dc0d2a7a3 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1,8 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/ipv6_route.h>
-#include <linux/nexthop.h>
-
 #include "alloc-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
@@ -20,6 +17,9 @@
 #include "vrf.h"
 #include "wireguard.h"
 
+#include <linux/ipv6_route.h>
+#include <linux/nexthop.h>
+
 static Route* route_detach_impl(Route *route) {
         assert(route);
         assert(!!route->network + !!route->manager + !!route->wireguard <= 1);
-- 
2.45.1


M systemd/0100-Do-not-buffer-on-systemd-sleep.patch => systemd/0100-Do-not-buffer-on-systemd-sleep.patch +0 -9
@@ 2,15 2,6 @@ diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 0402bb07f3..a6cbb45340 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -139,7 +139,7 @@ static int write_state(int fd, char * const *states) {
                 if (k < 0)
                         return RET_GATHER(r, k);
 
-                k = write_string_stream(f, *state, 0);
+                k = write_string_stream(f, *state, WRITE_STRING_FILE_DISABLE_BUFFER);
                 if (k >= 0) {
                         log_debug("Using sleep state '%s'.", *state);
                         return 0;
@@ -157,7 +157,7 @@ static int write_mode(const char *path, char * const *modes) {
         assert(path);
 

M systemd/0101-efi-do-not-set-wide-exec-charset.patch => systemd/0101-efi-do-not-set-wide-exec-charset.patch +3 -3
@@ 8,10 8,10 @@ setting to UCS2 produces unbootable binary on musl (iconv difference?)
 src/boot/efi/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
diff --git a/src/boot/meson.build b/src/boot/meson.build
index 1c52629..59140cb 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
--- a/src/boot/meson.build
+++ b/src/boot/meson.build
@@ -137,7 +137,6 @@ efi_c_args = [
 ]
 

M systemd/0102-efi-hack-out-musl-wchar-definition.patch => systemd/0102-efi-hack-out-musl-wchar-definition.patch +3 -3
@@ 8,10 8,10 @@ use the compiler __WCHAR_TYPE__ for 16-bit, which sd-boot assumes
 src/boot/efi/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
diff --git a/src/boot/meson.build b/src/boot/efi/meson.build
index 1c52629..99cfdc2 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
--- a/src/boot/meson.build
+++ b/src/boot/meson.build
@@ -130,6 +130,7 @@ efi_includes = [fundamental_include, include_directories('.')]
 
 efi_c_args = [

M systemd/APKBUILD => systemd/APKBUILD +53 -55
@@ 1,7 1,7 @@
# Contributor: xdavidwu <xdavidwuph@gmail.com>
# Maintainer: xdavidwu <xdavidwuph@gmail.com>
pkgname=systemd
pkgver=256.10
pkgver=257.2
pkgrel=0
pkgdesc="System and Service Manager"
url="https://www.github.com/systemd/systemd"


@@ 16,31 16,30 @@ checkdepends=""
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion"
source="$pkgname-$pkgver.tar.gz::https://github.com/systemd/systemd/archive/refs/tags/v$pkgver.tar.gz
	0004-missing_type.h-add-comparison_fn_t.patch
	0005-add-fallback-parse_printf_format-implementation.patch
	0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
	0007-add-missing-FTW_-macros-for-musl.patch
	0008-Use-uintmax_t-for-handling-rlim_t.patch
	0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
	0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch
	0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
	0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
	0013-avoid-redefinition-of-prctl_mm_map-structure.patch
	0014-do-not-disable-buffer-in-writing-files.patch
	0015-Handle-__cpu_mask-usage.patch
	0016-Handle-missing-gshadow.patch
	0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
	0018-pass-correct-parameters-to-getdents64.patch
	0019-Adjust-for-musl-headers.patch
	0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
	0021-errno-util-Make-STRERROR-portable-for-musl.patch
	0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch
	0023-shared-Do-not-use-malloc_info-on-musl.patch
	0024-avoid-missing-LOCK_EX-declaration.patch
	0025-include-signal.h-to-avoid-the-undeclared-error.patch
	0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
	0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch
	0028-build-path.c-avoid-boot-time-segfault-for-musl.patch
	0003-missing_type.h-add-comparison_fn_t.patch
	0004-add-fallback-parse_printf_format-implementation.patch
	0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
	0006-add-missing-FTW_-macros-for-musl.patch
	0007-Use-uintmax_t-for-handling-rlim_t.patch
	0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch
	0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
	0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
	0011-avoid-redefinition-of-prctl_mm_map-structure.patch
	0012-do-not-disable-buffer-in-writing-files.patch
	0013-Handle-__cpu_mask-usage.patch
	0014-Handle-missing-gshadow.patch
	0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
	0016-pass-correct-parameters-to-getdents64.patch
	0017-Adjust-for-musl-headers.patch
	0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
	0019-errno-util-Make-STRERROR-portable-for-musl.patch
	0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch
	0021-shared-Do-not-use-malloc_info-on-musl.patch
	0022-avoid-missing-LOCK_EX-declaration.patch
	0023-include-signal.h-to-avoid-the-undeclared-error.patch
	0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
	0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch
	0026-build-path.c-avoid-boot-time-segfault-for-musl.patch
	0100-Do-not-buffer-on-systemd-sleep.patch
	0101-efi-do-not-set-wide-exec-charset.patch
	0102-efi-hack-out-musl-wchar-definition.patch


@@ 129,35 128,34 @@ dev() {
}

sha512sums="
4ae25a40a473984c4caefd63e69af12c8965184c1c55539086b04050a457bb0175f15adf87b3a86b476357ccb402abc72844033e40e2dc4f9abb6cc3bb65e22c  systemd-256.10.tar.gz
8c49e9bd1f98a08c536fada241c0eea556a9c0fd2ed52ffc23e39663cf94e53ec6a8539f4dba0d193542341932063a6a8b7fe63ed4636ae35c517355f9163f19  0004-missing_type.h-add-comparison_fn_t.patch
47c709c3420673fe64921f0ceb8c6fb12b8d1b836dfd3f09ee80b8628debb77071851fc5957f30246895a4416b8684ec704c27acf332939e3b5686fa693af5ba  0005-add-fallback-parse_printf_format-implementation.patch
84e1f974f26d97e7cb12562496fee68480a7cc8683d352ade72e0d1d6739b9755fad1e81fc097b05368e6ab4762892d1afaac20ea366ee4f6b859b0f60492c88  0006-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
1d81b848dcfe29f30871e871fa1fa8a495a3b76108355723d85c44adc4dd1900464ebd5fc9b9dda1d2bb818f4d351d591f4335f47036882f1ce1709ecbcb80ed  0007-add-missing-FTW_-macros-for-musl.patch
31233b22f7ca7cef9d7be1946b3ebefe7116aa96f549a1812ceadee535649bf15725e48551dfd9416eeb98436af42ad98132a818793f3b99b4f93cc8ac42a02f  0008-Use-uintmax_t-for-handling-rlim_t.patch
8ac89bab45cef2a958abd65d5ba9adb31b4a3da1abde0a699ea0926024a80530f8329a9b4deafb0c01a146ca6a74dc9b6d523495590f8495c89dc76fb9d3b961  0009-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch
f73d3101ed69d966366181b14e9f7fabf02dd984398256650799e6a19260e18efc9b120ba3fe33655b5468e67d501c0ee0f03fe318350956cd0bf7cac70035b1  0010-Define-glibc-compatible-basename-for-non-glibc-syste.patch
500d772d8db50fba5d47eb40ad0002036eb963ec4101f61175e49515f33c3fb9a421f02b48a266e8c328a4b29a06870dfed8334f3bb0e038afd0f87067ba626f  0011-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
4d7829249e1a14261a5950a09dc4c84914cc8779720aaefd3064a7e1c2e271fb456511a0f1c5cf8b2a0c26e39f8107eba0c7808c4802f7941c03935ae02f2dc2  0012-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
ad6438c062e1d3840cf9eaf34684f9a8443e5552bf0518a36d8cbd17ee28328d1876de28b21b96bba0978a1867dd93e4458dd8dcb5d19f946bab14e4d88a29fb  0013-avoid-redefinition-of-prctl_mm_map-structure.patch
9b5ce75f909ca1f3c189d715d9af945ce3099393ad99da0ec81c948de61e076cba89439eaba001bd7fc827f0385159fd79d3ff5889f3aeef9ebfe49de0ec1210  0014-do-not-disable-buffer-in-writing-files.patch
5a5b5ace349d9dd9b06096573c44275d8f49209edcaff64e48f3eb5d96ab651ca1384860e0ae4db6da104e0a1b8b2d47d504e87355548f87030bf03acb4a47f1  0015-Handle-__cpu_mask-usage.patch
9b80f17838e87ff8230cfb2b1f08c28112231af2961e60162674938f298c2f4d85085ac35f44d1655e34ccc716946352e7fa258be3e35f66b28c358ae02483b5  0016-Handle-missing-gshadow.patch
aa0ec779c158f782802b98da96c997d034112990140fb72883de1eb37b87048a7ee63a69e1a0ddac198d5ecd279aca5dc4b9c91c4ff90da3cbf8cc67ef72f27a  0017-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
2fec0244271fa5c79b16031a12079a47162b8f2611a7ccc7cf631fa003809dcbb0d4b3e2bf23e6f9ec3db380bf9e70011b17dc16dcab0c4900e0138e3c1ecbc2  0018-pass-correct-parameters-to-getdents64.patch
4cf905b4c5caa03816af3a4befe06deb7d3270bf14eed649b5e8415b3a840dc16e292a7d812a45c346f0de30996380ef97432894f8badacf3aa55d2fd8f16491  0019-Adjust-for-musl-headers.patch
af26d46af5ab4596d113b92c2a170ea75d7095694b341f5f283fc48981237a4e97c09355f432fe26507240cc6bb2e62bf69be4d87eeb44b8d002d581cc2abf63  0020-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
58c3d593fad7b834c95d91b5facc0a831bc1ad4a7b962e56d9d4e124b7ab0b98330f939e54d525ff6529905540fe8f5111637e5b22b03760bd8962ced86f751b  0021-errno-util-Make-STRERROR-portable-for-musl.patch
b931d5916349534154bfd82eddad80a3d6b0ffe2c31e11934d6cc7f1db80263d697731064f28748883e84994e3fc07f9e86aa329cb90f04ee492d66220aeaffd  0022-sd-event-Make-malloc_trim-conditional-on-glibc.patch
a494bbc2852c516cdb41cb7e412ec65180544298469b27782483c50bdd4b4193ab886046c0803c651d0a5a6571c1b5737c7ff6ea7e251b76b223a2c7f8318892  0023-shared-Do-not-use-malloc_info-on-musl.patch
133801b668da725259426ddd893c20aa6a66e2beb3edb896a62d95ffb0e667cdbf68101a89102e8aceb61c50105b044178bd970c16a7a4139f336c5159b0f924  0024-avoid-missing-LOCK_EX-declaration.patch
0881dc9c854734689d8b83bd5680d7863af721ddb7cbcd157cdf26c5daf7c2f3cd870736785ad86e9b62e1c6c8c2b1dd9c5a30b1afdff2a826cf9cd5d1e9dfad  0025-include-signal.h-to-avoid-the-undeclared-error.patch
ab39b15c5b2216db65f60300c2246182b51c9da529e35991cdd6c350602c8012c505788483294b4696738b1ad8377556325d4b595c79d2c03981d8336a75390c  0026-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
c32cc25479e251c5293e80499d96ab437bddf9a55329c74675f96f4cfac1244b1637faddd6427e3229491e8eb6e037686fc7d94a155247894183c6f4b1a212e1  0027-adjust-header-inclusion-order-to-avoid-redeclaration.patch
4c6ef1b0811cfcd403a9aaa60f14aaa1704b675592c0f49ad4c8215fc9415a3d0b36528a9cf338965c6dec9c41d3e4c580bf70151dca5a63dca2665c189967a5  0028-build-path.c-avoid-boot-time-segfault-for-musl.patch
09ffd63addf1ae060ce617695b587963da6c1300595b01f8edc5ee4c4d4182f6ef909f2b07489f6fb9e3cbdad73dfb57dc932722c7422e1596b68327d7da3769  0100-Do-not-buffer-on-systemd-sleep.patch
4ea51f1b47140ee79d738fa983c42402ed0bb4c5ae79880fd30555c7571b5e0a4e7e86457be987bfdf0da928a1111a54709ed54a6676305e5036920347adb5cd  0101-efi-do-not-set-wide-exec-charset.patch
ab3075a07010708fa795a9ff2a0f08f9a0a317034479e41bc8948c0d24155087b797b832e13dc6f534151600dbe5ad4526e9a48eec0328fc00c6609a8328aee7  0102-efi-hack-out-musl-wchar-definition.patch
4f47fcd9a4148101ee7b85cf5908a04ec9e025dc7a5a2e8e61c05439cfd427851b6d356bb96a0dfae55566bbf6d3c93a13251d220840c09296e94f80bd4a5945  systemd-257.2.tar.gz
86a73988745ba7f592c0ee65cd8be0a65f65feac010faab96f2b752c53751cb354f3c1d82d06381576aa0e2b15b1e87f3e6e6c087b398b8e9820d5b8b4447de6  0003-missing_type.h-add-comparison_fn_t.patch
88a11ee0053551527687219bbd3abcab373f2799a2addca4329c491b4154ed8b6b575b75d1f5a7af6a0e7cc16cb0b4ac64f76d52f65d9442ac847c88c84f86de  0004-add-fallback-parse_printf_format-implementation.patch
23bed168fcffffd0573471f653a67700da14c34212932462b861e3f335aadf4cccb4204b0f5f9f80b2605f11f9204e5f803213c8a183ba8aed28764ce95b7c3f  0005-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
37daf08d502483ed333eb38f8342693469d60b33c6ef6158a37eed5a03efe72ec8c6e21503d8a75a071c556522bcddcee971a1fc8c2517573586958704477b30  0006-add-missing-FTW_-macros-for-musl.patch
0a2c2adc458d16a2b5ec6149353603235d36171d9494fbbb57097984b2b2feb5e427051e1b87ee4d1a548b06a4e5822eb5b3793aacb77e2d1f817a2246697f13  0007-Use-uintmax_t-for-handling-rlim_t.patch
a60246d0760d02770728dcf85afcdd7581b9c5052eabcb51763b4321f16ab503c99d914ab1a1acab9afb974510d5ef855189ac346aea815c44e4387a2ca7b4e5  0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch
5c3faba8b79eaf8b7eea6ff5537819417ebe33b025356f38e5bdc00fd0619989900394d08672ae560e28d5ff8e37947476437ec8b52fbc923f6bf11574ca7db1  0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
0497b613a56f2f0b95cb9d2f57ceb6c2911b23085783822f58939911072689853108cfce920efeedc30ebcb069d7e5c0fcf6cff8d5c879fa47f9766cbe908a41  0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
2450010918858f2b07df4baa3571471aa35e69440ce83000922be87e8e1ae3d91abe5a5b4fcacda36f918f8db10f5a79d8844bf765f2d9cbecbf0419976c19f7  0011-avoid-redefinition-of-prctl_mm_map-structure.patch
7b23496c053a86ccdfd38eab6c39b76d0e7d9e0be45c3c3e50ce52278e14eb345b034156dac81fadb5975b98b62f9ac06edca8bb6870984880e2f9ef18c68885  0012-do-not-disable-buffer-in-writing-files.patch
4b0aac0037b72246abfefcdecc809af645ec41ae8836f8cae1407f6a3459278694e6c77df4b410ce15372577ceb6b39db9386b9e6588887c184c82c42717e333  0013-Handle-__cpu_mask-usage.patch
4663cc896ad20280fbd578455941b94e3487a0a77ad9f59adf754934ea5926bf434af05c57a2b9ffec4405c0caf404a9daa8fe26e0cb7434224672da46a472d3  0014-Handle-missing-gshadow.patch
799271bf468ec8af895955ca45c72fd0c7b238ea56671f12808e01933110fd222d2f25b4fe9d7fe80961ac4723eabf412f086a39f96aa9012b4f270aa239ce7b  0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch
52e9d4120406347e0ac94c414fef58b54f3d9245c3152a9821f63ef2dd487fb50bb8f283e270d1a6a208c17e66e2690cc7f165b54923f2fb592f52f0ef457576  0016-pass-correct-parameters-to-getdents64.patch
2d7d20aeca6181b7d9b2c8fd7b7ba04b85295857a78cc4c8b8d7378b5042d588ac76e5072f16411d62c2745b97663e28166142b833f98c65cbfea6718b237fe9  0017-Adjust-for-musl-headers.patch
13c056df5b7986db62025b92290d15bd1e13835b7bf3d8f82aba3e535c95eadd92e7bd0b92137b88b64c34d712573fd74d9aa2738d66ed32333e94341599dacb  0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch
eaa8f48d435ee28db4b9cf9d61586c920aa699b8443dd08c8ca61b3fae426c2222a5863fb71859510fc60331cb153ce8da7a4d0cc7af02f4c2cf50e7689a0752  0019-errno-util-Make-STRERROR-portable-for-musl.patch
17135bc16f15d1acf611ae37f0d34aba67407c3765c8fc2351737f433c283ee5b4d8394399cc552c3996cc96d25452b5cf6027d9212c8ddca83c98624f8d6301  0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch
e8ca24725529a3ca47dddf1c0e6cb3483d78b0c6a70fb135e71290e589fc9ab86e0219f1ed1dfa68833f49c835d471e7b7f59f3998daef0869eff1be89da21d0  0021-shared-Do-not-use-malloc_info-on-musl.patch
920f9cec71f79cfb9dfee2b502ad4e683babc1d417e56543b7769cc79860e56207405a070a9ffc05bebd176ddf4bbe0f62cc4fe0d8079ff148abbefaaf668ed0  0022-avoid-missing-LOCK_EX-declaration.patch
6b6a58bf6dcded41686b2921793feeaaea1946118132a479fe978b20c734f93d0244567b394a337c8aee5ad6bd11c3dd5c41b83934cd6773abf99578ccd8870a  0023-include-signal.h-to-avoid-the-undeclared-error.patch
6f4b50e4cd99e4e65e5ec18578caa32441a174b1218d4a7cac2bd8077db8b22c34198c597e6973d63c8f939488acc835c1a2c7a87af2d3e7b63ce434d15b28dc  0024-undef-stdin-for-references-using-stdin-as-a-struct-m.patch
3d02e73e2f9654cf4e5ac7c7b7ac7c93f14cb46822be421a20b24dc7f85b0636174093aa13f90226e9200f4962974e1cc32f017132d1cf754b3e9a317c472f2c  0025-adjust-header-inclusion-order-to-avoid-redeclaration.patch
b2a6e7240552f860e35785a167c081aa71aa2438c3c981b774fe551d90542433419b51b599061b1fc9436d6b389eba111e012ff267088f26fa501dab696bcc43  0026-build-path.c-avoid-boot-time-segfault-for-musl.patch
73b8d0f967599c64f3978b1305bff6ad88725c6bf5d41d46c5ba9398462dfdb2e1c1eb6fd2ec668871505690e053c764108c1647f12f2be8d2f29e128f4482f8  0100-Do-not-buffer-on-systemd-sleep.patch
a0a5de09f9f4141505b4bb6867e7d698a4097eee0f663d864607b1edf0665bf91b5787482ce4f98d9e5c9feeb5d88baa83cfbcbf0fdb2c18d3c460342a0ef626  0101-efi-do-not-set-wide-exec-charset.patch
e1c6cebcd1e8e4edf60df9d4aea1cd87622c7e2d5a07b3809a870f5644cc0ff9db6f51a8c46444c1316baee08a9fc77bbb9bd0c4d97d6ca5cd7e683a3d9235ad  0102-efi-hack-out-musl-wchar-definition.patch
ec8feed6259e52874ff8c3019746a6c40d38cc4b5a775d934161c51515f435768baad7d87315ecf8192266d2a5e096137a73c8bbe2f8f88b6844e53c276cfdd1  0103-meson-lintl-for-musl-gettext.patch
d70800a1e7ce4de3a297420ddb9071f3ea68eb5bc87a0f17f06557556b4b0467fc3afaa6eebe8c0553cc8860327455e17e5a25d27b27abc46ac45062ea168201  0104-DNM-alpine-path-util-support-pre-usrmerge.patch
"