mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-26 12:00:48 -09:00
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).
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
2f825f1bf8
commit
94334f9d20
@@ -0,0 +1,37 @@
|
||||
From ad6a29985b6d78a37af5616338e51bafc8653c71 Mon Sep 17 00:00:00 2001
|
||||
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
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 <arnout@rnout.be>
|
||||
---
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user