commit:     097354da867d44641a7bb44f927e52c02e773c2b
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 21:17:46 2025 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 21:17:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=097354da

sys-block/mtx: fix c23 pointer declarations

Closes: https://bugs.gentoo.org/943904
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-block/mtx/files/mtx-1.3.12-c23.patch                 | 16 ++++++++++++++++
 .../mtx/{mtx-1.3.12.ebuild => mtx-1.3.12-r1.ebuild}      |  7 +++++--
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/sys-block/mtx/files/mtx-1.3.12-c23.patch 
b/sys-block/mtx/files/mtx-1.3.12-c23.patch
new file mode 100644
index 000000000000..c923c7100aac
--- /dev/null
+++ b/sys-block/mtx/files/mtx-1.3.12-c23.patch
@@ -0,0 +1,16 @@
+Description: Fix compilation with gcc15 / c23
+Author: Dan HorĂ¡k <[email protected]>
+Bug-Debian: http://bugs.debian.org/1097421
+
+--- a/mtx.h
++++ b/mtx.h
+@@ -222,7 +222,8 @@ typedef unsigned char Direction_T;
+ #define Input   0
+ #define Output  1
+ #else
+-typedef enum { false, true } boolean;
++#include <stdbool.h>
++typedef bool boolean;
+ 
+ typedef enum { Input, Output } Direction_T;
+ #endif

diff --git a/sys-block/mtx/mtx-1.3.12.ebuild 
b/sys-block/mtx/mtx-1.3.12-r1.ebuild
similarity index 83%
rename from sys-block/mtx/mtx-1.3.12.ebuild
rename to sys-block/mtx/mtx-1.3.12-r1.ebuild
index 5f8fb3fcbf75..4d4683fda994 100644
--- a/sys-block/mtx/mtx-1.3.12.ebuild
+++ b/sys-block/mtx/mtx-1.3.12-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 DESCRIPTION="Utilities for controlling SCSI media changers and tape drives"
 HOMEPAGE="https://sourceforge.net/projects/mtx/";
@@ -11,7 +11,10 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 ~hppa ppc ppc64 ~riscv ~sparc x86"
 
-PATCHES=( "${FILESDIR}"/${P}-fix-buildsystem.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-buildsystem.patch
+       "${FILESDIR}"/${P}-c23.patch
+)
 
 DOCS=( CHANGES COMPATABILITY FAQ README TODO )
 HTML_DOCS=( mtxl.README.html )

Reply via email to