]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
shadow: fix build with GCC 10
authorRoss Burton <ross.burton@arm.com>
Fri, 13 Mar 2026 16:25:55 +0000 (16:25 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Mar 2026 16:39:26 +0000 (16:39 +0000)
Fix the build with GCC 10 which otherwise fails due to function parameters
being unnamed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/shadow/files/prototypes.patch [new file with mode: 0644]
meta/recipes-extended/shadow/shadow_4.19.4.bb

diff --git a/meta/recipes-extended/shadow/files/prototypes.patch b/meta/recipes-extended/shadow/files/prototypes.patch
new file mode 100644 (file)
index 0000000..dfdfc9b
--- /dev/null
@@ -0,0 +1,38 @@
+Give unused function arguments names as GCC 10 will fail otherwise.
+
+This is a continuation of a PR that has been merged upstream[1] but
+this merged after expiry.c[2] and logout.c[3] were removed.
+
+[1] shadow cb0ec030 ("Fix build failure on hosts with gcc 10")
+[2] shadow 2bb1b984 ("*/: expiry(1): Remove program")
+[3] shadow eec97ce4 ("Remove unused `logoutd` utility")
+
+Upstream-Status: Inappropriate [code no longer exists upstream]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/src/expiry.c b/src/expiry.c
+index 8da89bd..0abf011 100644
+--- a/src/expiry.c
++++ b/src/expiry.c
+@@ -37,7 +37,7 @@ static void process_flags (int argc, char **argv);
+  * catch_signals - signal catcher
+  */
+ static void
+-catch_signals(int)
++catch_signals(MAYBE_UNUSED int _1)
+ {
+       _exit (10);
+ }
+diff --git a/src/logoutd.c b/src/logoutd.c
+index c87b75c..09a24b3 100644
+--- a/src/logoutd.c
++++ b/src/logoutd.c
+@@ -116,7 +116,7 @@ static void send_mesg_to_tty (int tty_fd)
+  *    off from the system.
+  */
+ int
+-main(int argc, char *[])
++main(int argc, char *argv[])
+ {
+       pid_t  pid;
index 7bc7f745555c980ebaf3a8b0c2f0b981a3adfc16..9fe6a27e41113f7ddec62e06dff9519429caf6f1 100644 (file)
@@ -14,6 +14,7 @@ GITHUB_BASE_URI = "https://github.com/shadow-maint/shadow/releases"
 SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \
            ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \
            file://useradd \
+                  file://prototypes.patch \
            "
 
 SRC_URI:append:class-target = " \