Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/desmume/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile	31 Mar 2022 17:12:50 -0000	1.30
+++ Makefile	9 Dec 2022 02:29:32 -0000
@@ -3,7 +3,7 @@ USE_WXNEEDED =	Yes
 COMMENT =	Nintendo DS emulator
 
 DISTNAME =	desmume-0.9.11
-REVISION =	10
+REVISION =	11
 
 CATEGORIES =	emulators
 
@@ -44,6 +44,7 @@ COMPILER =	base-clang ports-gcc
 CONFIGURE_STYLE =	gnu
 FIX_CRLF_FILES =	src/MMU_timing.h \
 			src/path.h \
+			src/arm_jit.cpp \
 			src/utils/AsmJit/core/stringbuilder.h
 
 .include <bsd.port.mk>
Index: patches/patch-src_arm_jit_cpp
===================================================================
RCS file: patches/patch-src_arm_jit_cpp
diff -N patches/patch-src_arm_jit_cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_arm_jit_cpp	9 Dec 2022 02:29:32 -0000
@@ -0,0 +1,18 @@
+BSS is immutable so mark it as mutable so that mprotect RWX works
+
+see: mimmutable(1)
+https://github.com/google/syzkaller/commit/bc009f82ea71c399f19eef28f115ff5cda7be4ba
+
+Index: src/arm_jit.cpp
+--- src/arm_jit.cpp.orig
++++ src/arm_jit.cpp
+@@ -198,7 +198,8 @@ static u8 recompile_counts[(1<<26)/16];
+ // Reduces memory needed for function pointers.
+ // FIXME win64 needs this too, x86_32 doesn't
+ 
+-DS_ALIGN(4096) static u8 scratchpad[1<<25];
++DS_ALIGN(4096) static u8 scratchpad[1<<25]
++	__attribute__((section(".openbsd.mutable")));
+ static u8 *scratchptr;
+ 
+ struct ASMJIT_API StaticCodeGenerator : public Context
Index: patches/patch-src_path_h
===================================================================
RCS file: /cvs/ports/emulators/desmume/patches/patch-src_path_h,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-src_path_h
--- patches/patch-src_path_h	11 Mar 2022 18:59:34 -0000	1.3
+++ patches/patch-src_path_h	9 Dec 2022 02:29:32 -0000
@@ -3,7 +3,7 @@ From upstream 8454c93fa37ce9f3c8becc7004
 Index: src/path.h
 --- src/path.h.orig
 +++ src/path.h
-@@ -375,7 +375,7 @@ class PathInfo (public)
+@@ -375,7 +375,7 @@ class PathInfo (public)
  				else if (strchr(strftimeArgs, *p))
  				{
  					char tmp[MAX_PATH];
