From ce412418ea5d165a35395845f70c3d4045415c7a Mon Sep 17 00:00:00 2001 From: solene Date: Tue, 31 Mar 2020 11:47:01 +0000 Subject: [PATCH] Add headers include in the snes patch to fix i386 compilation issue compilation issue reported by sthen@ --- emulators/mednafen/Makefile | 3 ++- .../patches/patch-src_snes_src_lib_libco_x86_c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/emulators/mednafen/Makefile b/emulators/mednafen/Makefile index 9c29764f78f..57817bd3a86 100644 --- a/emulators/mednafen/Makefile +++ b/emulators/mednafen/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.28 2020/03/29 10:10:29 solene Exp $ +# $OpenBSD: Makefile,v 1.29 2020/03/31 11:47:01 solene Exp $ BROKEN-hppa = ../../include/mednafen/state.h:21:7: error: 'exception_ptr' in namespace 'std' does not name a type COMMENT = emulates numerous game consoles DISTNAME = mednafen-1.24.1 +REVISION = 0 CATEGORIES = emulators games HOMEPAGE = https://mednafen.github.io diff --git a/emulators/mednafen/patches/patch-src_snes_src_lib_libco_x86_c b/emulators/mednafen/patches/patch-src_snes_src_lib_libco_x86_c index 99b1cc45a51..4440e76962b 100644 --- a/emulators/mednafen/patches/patch-src_snes_src_lib_libco_x86_c +++ b/emulators/mednafen/patches/patch-src_snes_src_lib_libco_x86_c @@ -1,20 +1,22 @@ -$OpenBSD: patch-src_snes_src_lib_libco_x86_c,v 1.1 2020/03/29 10:10:29 solene Exp $ +$OpenBSD: patch-src_snes_src_lib_libco_x86_c,v 1.2 2020/03/31 11:47:01 solene Exp $ This prevent the snes module to crash on load on i386 Index: src/snes/src/lib/libco/x86.c --- src/snes/src/lib/libco/x86.c.orig +++ src/snes/src/lib/libco/x86.c -@@ -9,6 +9,8 @@ +@@ -9,6 +9,10 @@ #include #include +#include +#include ++#include ++#include #ifdef __cplusplus extern "C" { -@@ -25,6 +27,7 @@ extern "C" { +@@ -25,6 +29,7 @@ extern "C" { static thread_local long co_active_buffer[64]; static thread_local cothread_t co_active_handle = 0; static void (fastcall *co_swap)(cothread_t, cothread_t) = 0; @@ -22,7 +24,7 @@ Index: src/snes/src/lib/libco/x86.c /* ABI: fastcall */ force_text_section static const unsigned char co_swap_function[] = { -@@ -64,7 +67,19 @@ cothread_t co_create(unsigned int size, void (*entrypo +@@ -64,7 +69,19 @@ cothread_t co_create(unsigned int size, void (*entrypo size += 256; /* allocate additional space for storage */ size &= ~15; /* align stack to 16-byte boundary */