summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-11-26 06:37:27 +0000
committerSam James <sam@gentoo.org>2024-11-26 06:37:27 +0000
commitab076e163cdfdacff9767d2d2879ca4b199580de (patch)
treebe48089d681fff13bd7cd25520bda03bd105967b /sys-block
parentsys-process/acct: build w/ -std=gnu17 (diff)
downloadgentoo-ab076e163cdfdacff9767d2d2879ca4b199580de.tar.gz
gentoo-ab076e163cdfdacff9767d2d2879ca4b199580de.tar.bz2
gentoo-ab076e163cdfdacff9767d2d2879ca4b199580de.zip
sys-block/parted: fix C23 compat
Closes: https://bugs.gentoo.org/943690 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/parted/files/parted-3.6-c23.patch38
-rw-r--r--sys-block/parted/parted-3.6-r2.ebuild2
2 files changed, 40 insertions, 0 deletions
diff --git a/sys-block/parted/files/parted-3.6-c23.patch b/sys-block/parted/files/parted-3.6-c23.patch
new file mode 100644
index 000000000000..97134562dd65
--- /dev/null
+++ b/sys-block/parted/files/parted-3.6-c23.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/943690
+https://debbugs.gnu.org/74444
+https://git.savannah.gnu.org/gitweb/?p=parted.git;a=commit;h=16343bda6ce0d41edf43f8dac368db3bbb63d271
+
+From 16343bda6ce0d41edf43f8dac368db3bbb63d271 Mon Sep 17 00:00:00 2001
+From: Rudi Heitbaum <rudi@heitbaum.com>
+Date: Wed, 20 Nov 2024 12:22:22 +0000
+Subject: [PATCH] bug#74444: [PATCH] parted: fix do_version declaration
+
+With gcc 15-20241117 compile fails with the below error, update the
+do_version declaration to match the header in command.h
+
+../../parted/parted.c: In function '_init_commands':
+../../parted/parted.c:2469:9: error: passing argument 2 of 'command_create' from incompatible pointer type [-Wincompatible-pointer-types]
+ 2469 | do_version,
+ | ^~~~~~~~~~
+ | |
+ | int (*)(void)
+In file included from ../../parted/parted.c:28:
+../../parted/command.h:35:39: note: expected 'int (*)(PedDevice **, PedDisk **)' {aka 'int (*)(struct _PedDevice **, struct _PedDisk **)'} but argument is of type 'int (*)(void)'
+ 35 | int (*method) (PedDevice** dev, PedDisk** diskp),
+ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
+Signed-off-by: Brian C. Lane <bcl@redhat.com>
+--- a/parted/parted.c
++++ b/parted/parted.c
+@@ -2172,7 +2172,7 @@ do_unit (PedDevice** dev, PedDisk** diskp)
+ }
+
+ static int
+-do_version ()
++do_version (PedDevice** dev, PedDisk** diskp)
+ {
+ printf ("\n%s\n%s",
+ prog_name,
+--
+2.34.1
diff --git a/sys-block/parted/parted-3.6-r2.ebuild b/sys-block/parted/parted-3.6-r2.ebuild
index c4c140fe695c..6da8fe0d91cd 100644
--- a/sys-block/parted/parted-3.6-r2.ebuild
+++ b/sys-block/parted/parted-3.6-r2.ebuild
@@ -51,6 +51,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.6-tests-non-bash.patch
# bug #910487
"${FILESDIR}"/${P}-underlinked-util-linux.patch
+ # bug #943690
+ "${FILESDIR}"/${P}-c23.patch
)
# false positive