commit:     bd0ba607911a443f2ba20d5b6653e8007e18df74
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Fri Jan  5 13:12:19 2024 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Fri Jan  5 13:13:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0ba607

app-emulation/86Box: fix incompatible-pointer-types

Closes: https://bugs.gentoo.org/919343
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-emulation/86Box/86Box-4.0.1-r1.ebuild          |  4 +++-
 .../86Box-4.0.1-incompatible-pointer-types.patch   | 23 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/app-emulation/86Box/86Box-4.0.1-r1.ebuild 
b/app-emulation/86Box/86Box-4.0.1-r1.ebuild
index cc978ae05ad0..16aac070243a 100644
--- a/app-emulation/86Box/86Box-4.0.1-r1.ebuild
+++ b/app-emulation/86Box/86Box-4.0.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -51,6 +51,8 @@ RDEPEND="
 
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/${PN}-4.0.1-incompatible-pointer-types.patch" )
+
 src_configure() {
        # LTO needs to be filtered
        # See https://bugs.gentoo.org/854507

diff --git 
a/app-emulation/86Box/files/86Box-4.0.1-incompatible-pointer-types.patch 
b/app-emulation/86Box/files/86Box-4.0.1-incompatible-pointer-types.patch
new file mode 100644
index 000000000000..df708d337b65
--- /dev/null
+++ b/app-emulation/86Box/files/86Box-4.0.1-incompatible-pointer-types.patch
@@ -0,0 +1,23 @@
+From 13d582b56faf9caca114ec5625b34a7859ecb41f Mon Sep 17 00:00:00 2001
+From: OBattler <[email protected]>
+Date: Fri, 5 Jan 2024 13:01:17 +0100
+Subject: [PATCH] Unix: Use proper parentheses to cast the result, not the
+ flags, fixes #3994.
+
+---
+ src/unix/unix.c | 4 +---
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/unix/unix.c b/src/unix/unix.c
+index e784df38e6..cfa8243135 100644
+--- a/src/unix/unix.c
++++ b/src/unix/unix.c
+@@ -635,7 +635,7 @@
+     SDL_MessageBoxData       msgdata;
+     SDL_MessageBoxButtonData msgbtn;
+     if (!header)
+-        header = (void *) (flags & MBX_ANSI) ? "86Box" : L"86Box";
++        header = (void *) ((flags & MBX_ANSI) ? "86Box" : L"86Box");
+     if (header <= (void *) 7168)
+         header = (void *) plat_get_string((int) header);
+     if (message <= (void *) 7168)

Reply via email to