diff options
Diffstat (limited to 'media-gfx')
| -rw-r--r-- | media-gfx/sane-backends/files/sane-backends-1.3.1-gphoto2_strchr_c23.patch | 31 | ||||
| -rw-r--r-- | media-gfx/sane-backends/sane-backends-1.3.1-r2.ebuild | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/media-gfx/sane-backends/files/sane-backends-1.3.1-gphoto2_strchr_c23.patch b/media-gfx/sane-backends/files/sane-backends-1.3.1-gphoto2_strchr_c23.patch new file mode 100644 index 000000000000..70f5cc516ac2 --- /dev/null +++ b/media-gfx/sane-backends/files/sane-backends-1.3.1-gphoto2_strchr_c23.patch @@ -0,0 +1,31 @@ +From d04d17b456d9847021b6df6eb08a3419a75172cf Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal <zdohnal@redhat.com> +Date: Wed, 7 Jan 2026 17:11:27 +0100 +Subject: [PATCH] gphoto2.c: Fix build failure with GCC 16 and C23 + +The function `strchr()` in the standard C23 now returns const pointer if +const pointer is present as parameter and vice-versa, so if the returned +string is about to be modified, non-const parameter has to be used. + +GCC 16 started to enforce this rule, which made sane-backends to fail +during build when GCC 16 + C23 standard are used. +--- + backend/gphoto2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backend/gphoto2.c b/backend/gphoto2.c +index 758829aee..386cecb20 100644 +--- a/backend/gphoto2.c ++++ b/backend/gphoto2.c +@@ -586,7 +586,7 @@ get_info (void) + folder_list[n] = strdup (val); + if (strchr ((const char *) folder_list[n], ' ')) + { +- *strchr ((const char *) folder_list[n], ' ') = '\0'; ++ *strchr (folder_list[n], ' ') = '\0'; + } + } + if (n == 0) +-- +GitLab + diff --git a/media-gfx/sane-backends/sane-backends-1.3.1-r2.ebuild b/media-gfx/sane-backends/sane-backends-1.3.1-r2.ebuild index e60825538737..e3057fc1d819 100644 --- a/media-gfx/sane-backends/sane-backends-1.3.1-r2.ebuild +++ b/media-gfx/sane-backends/sane-backends-1.3.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -179,6 +179,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch + "${FILESDIR}"/${PN}-1.3.1-gphoto2_strchr_c23.patch ) # ./configure checks to see if these are defined in sys/io.h, |
