package/systemd: fix host build with 7.0+ kernel
PATCH 1/1 package/systemd: fix host build with 7.0+ kernel
Linux v7.0 introduced a few more errno values that are aliases of other errnos. This causes the following error:
In file included from ../src/basic/errno-list.c:13:src/basic/errno-to-name.h:71:23: error: initialized field overwritten [-Werror=override-init]
71 | [EFSBADCRC] = "EFSBADCRC",
| ^~~~~~~~~~~
src/basic/errno-to-name.h:71:23: note: (near initialization for ‘errno_names[74]’)
src/basic/errno-to-name.h:114:26: error: initialized field overwritten [-Werror=override-init]
114 | [EFSCORRUPTED] = "EFSCORRUPTED",
| ^~~~~~~~~~~~~~src/basic/errno-to-name.h:114:26: note: (near initialization for ‘errno_names[117]’)
cc1: some warnings being treated as errors
For target systemd this is not an issue as we don't support v7.0, however it also occurs for host-systemd when building on a system with kernel v7.0+.
Backport an upstream patch that excludes these two errnos from the errno-to-name array. The upstream patch was applied to v261 and backported to v258.5, but it was not backported to v256-stable (which is EOL).
--- ...ilter-out-EFSBADCRC-and-EFSCORRUPTED.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/systemd/0002-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch
package/systemd/0002-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch new file +37 -0
@@ -0,0 +1,37 @@ +From ad6a29985b6d78a37af5616338e51bafc8653c71 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <[email protected]> +Date: Tue, 24 Feb 2026 20:19:45 +0900 +Subject: [PATCH] errno-list: filter out EFSBADCRC and EFSCORRUPTED + +These are introduced in kernel v7.0. + +Upstream: https://github.com/systemd/systemd/commit/3cfb16998808a6ec8012a6120d0a82f0e1a0c8bb +Signed-off-by: Arnout Vandecappelle <[email protected]> +--- + src/basic/generate-errno-list.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/basic/generate-errno-list.sh b/src/basic/generate-errno-list.sh +index f756b2e020..491fa1b6e3 100755 +--- a/src/basic/generate-errno-list.sh ++++ b/src/basic/generate-errno-list.sh +@@ -3,9 +3,13 @@ + set -eu + set -o pipefail + +-# In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and EREFUSED are defined as aliases of +-# ECANCELED and ECONNREFUSED, respectively. Let's drop them. ++# In kernel's arch/parisc/include/uapi/asm/errno.h, The following aliases are defined: ++# ECANCELLED → ECANCELED ++# EREFUSED → ECONNREFUSED ++# EFSBADCRC → EBADMSG ++# EFSCORRUPTED → EUCLEAN ++# Let's drop them. + + ${1:?} -dM -include errno.h - </dev/null | \ +- grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED)' | \ ++ grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED|EFSBADCRC|EFSCORRUPTED)' | \ + awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }' +-- +2.54.0 +
Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 18 lines
Linux v7.0 introduced a few more errno values that are aliases of other errnos. This causes the following error:
In file included from
../src/basic/errno-list.c:13:src/basic/errno-to-name.h:71:23: error: initialized field overwritten [-Werror=override-init]
71 | [EFSBADCRC] = "EFSBADCRC",| ^~~~~~~~~~~ src/basic/errno-to-name.h:71:23: note: (near initialization for ‘errno_names[74]’) src/basic/errno-to-name.h:114:26: error: initialized field overwritten [-Werror=override-init] 114 | [EFSCORRUPTED] = "EFSCORRUPTED", | ^~~~~~~~~~~~~~
src/basic/errno-to-name.h:114:26: note: (near initialization for ‘errno_names[117]’)
cc1: some warnings being treated as errorsFor target systemd this is not an issue as we don't support v7.0, however it also occurs for host-systemd when building on a system with kernel v7.0+.
Quoted 6 lines
Backport an upstream patch that excludes these two errnos from the errno-to-name array. The upstream patch was applied to v261 and backported to v258.5, but it was not backported to v256-stable (which is EOL).
Signed-off-by Arnout Vandecappelle <[email protected]>
Applied to 2025.02.x. Thanks
Quoted 55 lines
--- ...ilter-out-EFSBADCRC-and-EFSCORRUPTED.patch | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/systemd/0002-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patchpackage/systemd/0002-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch new file +37
-0@@ -0,0 +1,37 @@ +From ad6a29985b6d78a37af5616338e51bafc8653c71 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <[email protected]> +Date: Tue, 24 Feb 2026 20:19:45 +0900 +Subject: [PATCH] errno-list: filter out EFSBADCRC and EFSCORRUPTED + +These are introduced in kernel v7.0. + +Upstream: https://github.com/systemd/systemd/commit/3cfb16998808a6ec8012a6120d0a82f0e1a0c8bb +Signed-off-by: Arnout Vandecappelle <[email protected]> +--- + src/basic/generate-errno-list.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/basic/generate-errno-list.sh b/src/basic/generate-errno-list.sh +index f756b2e020..491fa1b6e3 100755 +--- a/src/basic/generate-errno-list.sh ++++ b/src/basic/generate-errno-list.sh +@@ -3,9 +3,13 @@ + set -eu + set -o pipefail + +-# In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and EREFUSED are defined as aliases of +-# ECANCELED and ECONNREFUSED, respectively. Let's drop them. ++# In kernel's arch/parisc/include/uapi/asm/errno.h, The following aliases are defined: ++# ECANCELLED → ECANCELED ++# EREFUSED → ECONNREFUSED ++# EFSBADCRC → EBADMSG ++# EFSCORRUPTED → EUCLEAN ++# Let's drop them. + + ${1:?} -dM -include errno.h - </dev/null | \ +- grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED)' | \ ++ grep -Ev '^#define[[:space:]]+(ECANCELLED|EREFUSED|EFSBADCRC|EFSCORRUPTED)' | \ + awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }' +-- +2.54.0 +Signature · 6 lines
2.54.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot