* [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15
@ 2025-05-07 17:07 Florian Larysch
2025-05-07 17:38 ` Julien Olivain
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Florian Larysch @ 2025-05-07 17:07 UTC (permalink / raw)
To: buildroot; +Cc: Florian Larysch
On systems running GCC 15, host-cpio will fail to build with errors like
copyout.c:646:12: error: too many arguments to function 'xstat'; expected 0, have 2
and
main.c:407:13: error: assignment to 'int (*)(void)' from incompatible pointer type 'int (*)(const char * restrict, struct stat * restrict)' [-Wincompatible-pointer-types]
This was reported[1] and fixed upstream, but there is no new release
yet. Import the upstream patch for now.
[1] https://lists.gnu.org/archive/html/bug-cpio/2025-05/msg00000.html
Signed-off-by: Florian Larysch <fl@n621.de>
---
package/cpio/0001-Fix-c23-conformity.patch | 47 ++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 package/cpio/0001-Fix-c23-conformity.patch
diff --git a/package/cpio/0001-Fix-c23-conformity.patch b/package/cpio/0001-Fix-c23-conformity.patch
new file mode 100644
index 0000000000..63d598ad1c
--- /dev/null
+++ b/package/cpio/0001-Fix-c23-conformity.patch
@@ -0,0 +1,47 @@
+From f42137f5ab9cf07d1e62edc05e0212688d3ebaa2 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Tue, 6 May 2025 21:02:43 +0300
+Subject: [PATCH] Fix c23 conformity
+
+Upstream: https://git.savannah.gnu.org/gitweb/?p=cpio.git;a=commit;h=f42137f5ab9cf07d1e62edc05e0212688d3ebaa2
+
+---
+ src/extern.h | 4 ++--
+ src/global.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/extern.h b/src/extern.h
+index bf3d5b3..455119b 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -96,8 +96,8 @@ extern char input_is_special;
+ extern char output_is_special;
+ extern char input_is_seekable;
+ extern char output_is_seekable;
+-extern int (*xstat) ();
+-extern void (*copy_function) ();
++extern int (*xstat) (const char *, struct stat *);
++extern void (*copy_function) (void);
+ extern char *change_directory_option;
+
+ #define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
+diff --git a/src/global.c b/src/global.c
+index 66686f2..5c6ab16 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -184,10 +184,10 @@ bool to_stdout_option = false;
+
+ /* A pointer to either lstat or stat, depending on whether
+ dereferencing of symlinks is done for input files. */
+-int (*xstat) ();
++int (*xstat) (const char *, struct stat *);
+
+ /* Which copy operation to perform. (-i, -o, -p) */
+-void (*copy_function) () = 0;
++void (*copy_function) (void) = 0;
+
+ char *change_directory_option;
+
+--
+2.49.0
+
--
2.49.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15
2025-05-07 17:07 [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15 Florian Larysch
@ 2025-05-07 17:38 ` Julien Olivain
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Julien Olivain @ 2025-05-07 17:38 UTC (permalink / raw)
To: Florian Larysch; +Cc: buildroot
Hi Florian,
On 07/05/2025 19:07, Florian Larysch wrote:
> On systems running GCC 15, host-cpio will fail to build with errors
> like
>
> copyout.c:646:12: error: too many arguments to function 'xstat';
> expected 0, have 2
>
> and
>
> main.c:407:13: error: assignment to 'int (*)(void)' from incompatible
> pointer type 'int (*)(const char * restrict, struct stat * restrict)'
> [-Wincompatible-pointer-types]
>
> This was reported[1] and fixed upstream, but there is no new release
> yet. Import the upstream patch for now.
>
> [1] https://lists.gnu.org/archive/html/bug-cpio/2025-05/msg00000.html
>
> Signed-off-by: Florian Larysch <fl@n621.de>
I applied this patch to master, thanks.
I also made few minor changes. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/e3cae9e1ca4765da825c9ee94760e12f5c6c142a
Best regards,
Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15
2025-05-07 17:07 [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15 Florian Larysch
2025-05-07 17:38 ` Julien Olivain
@ 2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-16 11:05 UTC (permalink / raw)
To: Florian Larysch, buildroot
On 07/05/2025 19:07, Florian Larysch wrote:
> On systems running GCC 15, host-cpio will fail to build with errors like
>
> copyout.c:646:12: error: too many arguments to function 'xstat'; expected 0, have 2
>
> and
>
> main.c:407:13: error: assignment to 'int (*)(void)' from incompatible pointer type 'int (*)(const char * restrict, struct stat * restrict)' [-Wincompatible-pointer-types]
>
> This was reported[1] and fixed upstream, but there is no new release
> yet. Import the upstream patch for now.
>
> [1] https://lists.gnu.org/archive/html/bug-cpio/2025-05/msg00000.html
>
> Signed-off-by: Florian Larysch <fl@n621.de>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
> package/cpio/0001-Fix-c23-conformity.patch | 47 ++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 package/cpio/0001-Fix-c23-conformity.patch
>
> diff --git a/package/cpio/0001-Fix-c23-conformity.patch b/package/cpio/0001-Fix-c23-conformity.patch
> new file mode 100644
> index 0000000000..63d598ad1c
> --- /dev/null
> +++ b/package/cpio/0001-Fix-c23-conformity.patch
> @@ -0,0 +1,47 @@
> +From f42137f5ab9cf07d1e62edc05e0212688d3ebaa2 Mon Sep 17 00:00:00 2001
> +From: Sergey Poznyakoff <gray@gnu.org>
> +Date: Tue, 6 May 2025 21:02:43 +0300
> +Subject: [PATCH] Fix c23 conformity
> +
> +Upstream: https://git.savannah.gnu.org/gitweb/?p=cpio.git;a=commit;h=f42137f5ab9cf07d1e62edc05e0212688d3ebaa2
> +
> +---
> + src/extern.h | 4 ++--
> + src/global.c | 4 ++--
> + 2 files changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/extern.h b/src/extern.h
> +index bf3d5b3..455119b 100644
> +--- a/src/extern.h
> ++++ b/src/extern.h
> +@@ -96,8 +96,8 @@ extern char input_is_special;
> + extern char output_is_special;
> + extern char input_is_seekable;
> + extern char output_is_seekable;
> +-extern int (*xstat) ();
> +-extern void (*copy_function) ();
> ++extern int (*xstat) (const char *, struct stat *);
> ++extern void (*copy_function) (void);
> + extern char *change_directory_option;
> +
> + #define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
> +diff --git a/src/global.c b/src/global.c
> +index 66686f2..5c6ab16 100644
> +--- a/src/global.c
> ++++ b/src/global.c
> +@@ -184,10 +184,10 @@ bool to_stdout_option = false;
> +
> + /* A pointer to either lstat or stat, depending on whether
> + dereferencing of symlinks is done for input files. */
> +-int (*xstat) ();
> ++int (*xstat) (const char *, struct stat *);
> +
> + /* Which copy operation to perform. (-i, -o, -p) */
> +-void (*copy_function) () = 0;
> ++void (*copy_function) (void) = 0;
> +
> + char *change_directory_option;
> +
> +--
> +2.49.0
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15
2025-05-07 17:07 [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15 Florian Larysch
2025-05-07 17:38 ` Julien Olivain
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
@ 2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-16 11:05 UTC (permalink / raw)
To: Florian Larysch, buildroot
On 07/05/2025 19:07, Florian Larysch wrote:
> On systems running GCC 15, host-cpio will fail to build with errors like
>
> copyout.c:646:12: error: too many arguments to function 'xstat'; expected 0, have 2
>
> and
>
> main.c:407:13: error: assignment to 'int (*)(void)' from incompatible pointer type 'int (*)(const char * restrict, struct stat * restrict)' [-Wincompatible-pointer-types]
>
> This was reported[1] and fixed upstream, but there is no new release
> yet. Import the upstream patch for now.
>
> [1] https://lists.gnu.org/archive/html/bug-cpio/2025-05/msg00000.html
>
> Signed-off-by: Florian Larysch <fl@n621.de>
Applied to 2025.02.x, thanks.
Regards,
Arnout
> ---
> package/cpio/0001-Fix-c23-conformity.patch | 47 ++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 package/cpio/0001-Fix-c23-conformity.patch
>
> diff --git a/package/cpio/0001-Fix-c23-conformity.patch b/package/cpio/0001-Fix-c23-conformity.patch
> new file mode 100644
> index 0000000000..63d598ad1c
> --- /dev/null
> +++ b/package/cpio/0001-Fix-c23-conformity.patch
> @@ -0,0 +1,47 @@
> +From f42137f5ab9cf07d1e62edc05e0212688d3ebaa2 Mon Sep 17 00:00:00 2001
> +From: Sergey Poznyakoff <gray@gnu.org>
> +Date: Tue, 6 May 2025 21:02:43 +0300
> +Subject: [PATCH] Fix c23 conformity
> +
> +Upstream: https://git.savannah.gnu.org/gitweb/?p=cpio.git;a=commit;h=f42137f5ab9cf07d1e62edc05e0212688d3ebaa2
> +
> +---
> + src/extern.h | 4 ++--
> + src/global.c | 4 ++--
> + 2 files changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/extern.h b/src/extern.h
> +index bf3d5b3..455119b 100644
> +--- a/src/extern.h
> ++++ b/src/extern.h
> +@@ -96,8 +96,8 @@ extern char input_is_special;
> + extern char output_is_special;
> + extern char input_is_seekable;
> + extern char output_is_seekable;
> +-extern int (*xstat) ();
> +-extern void (*copy_function) ();
> ++extern int (*xstat) (const char *, struct stat *);
> ++extern void (*copy_function) (void);
> + extern char *change_directory_option;
> +
> + #define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
> +diff --git a/src/global.c b/src/global.c
> +index 66686f2..5c6ab16 100644
> +--- a/src/global.c
> ++++ b/src/global.c
> +@@ -184,10 +184,10 @@ bool to_stdout_option = false;
> +
> + /* A pointer to either lstat or stat, depending on whether
> + dereferencing of symlinks is done for input files. */
> +-int (*xstat) ();
> ++int (*xstat) (const char *, struct stat *);
> +
> + /* Which copy operation to perform. (-i, -o, -p) */
> +-void (*copy_function) () = 0;
> ++void (*copy_function) (void) = 0;
> +
> + char *change_directory_option;
> +
> +--
> +2.49.0
> +
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-16 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 17:07 [Buildroot] [PATCH 1/1] package/cpio: fix build with GCC 15 Florian Larysch
2025-05-07 17:38 ` Julien Olivain
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
2025-05-16 11:05 ` Arnout Vandecappelle via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox