From a026443b62d64cca452b9304c31ce50795399949 Mon Sep 17 00:00:00 2001
From: miqlas <miqlas@gmail.com>
Date: Sat, 13 Apr 2019 18:55:11 +0200
Subject: applying patch mednafen-unistd.patch


diff --git a/src/mempatcher.cpp b/src/mempatcher.cpp
index 9995db2..fd3306b 100644
--- a/src/mempatcher.cpp
+++ b/src/mempatcher.cpp
@@ -31,6 +31,7 @@
 #include "mempatcher.h"
 #include "FileStream.h"
 #include "MemoryStream.h"
+#include <unistd.h>
 
 namespace Mednafen
 {
-- 
2.21.0


From f9adbbe2f8b0a07779fbb9ffd2d6f0efb49a166e Mon Sep 17 00:00:00 2001
From: miqlas <miqlas@gmail.com>
Date: Sat, 13 Apr 2019 18:55:11 +0200
Subject: applying patch mednafen-signals.patch


diff --git a/src/drivers/main.cpp b/src/drivers/main.cpp
index ff7d59a..1f999ab 100644
--- a/src/drivers/main.cpp
+++ b/src/drivers/main.cpp
@@ -481,7 +481,7 @@ static void CreateDirs(void)
 }
 
 static bool volatile SignalSafeExitWanted = false;
-#if defined(HAVE_SIGNAL) || defined(HAVE_SIGACTION)
+#if 0
 static const char *SiginfoString = NULL;
 typedef struct
 {
-- 
2.21.0


From 1a85c7774c56a25761446f108ee6c4713010d6a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Tue, 16 Apr 2019 10:38:48 +0200
Subject: Enable PIC/PIE


diff --git a/configure.ac b/configure.ac
index 10cd75b..ddec364 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,12 +125,7 @@ dnl -mfunction-return=keep, -mindirect-branch=keep, -mno-indirect-branch-registe
 dnl
 CODEGEN_FLAGS=""
 
-AX_CFLAGS_GCC_OPTION([-fno-pic], CODEGEN_FLAGS)
-AX_CFLAGS_GCC_OPTION([-fno-pie], CODEGEN_FLAGS)
-AX_CFLAGS_GCC_OPTION([-fno-PIC], CODEGEN_FLAGS)
-AX_CFLAGS_GCC_OPTION([-fno-PIE], CODEGEN_FLAGS)
-AX_CFLAGS_GCC_OPTION([-nopie], CODEGEN_FLAGS)
-AX_CFLAGS_GCC_OPTION([-no-pie], CODEGEN_FLAGS)
+
 
 AX_CFLAGS_GCC_OPTION([-fwrapv],  CODEGEN_FLAGS)
 AX_CFLAGS_GCC_OPTION([-fjump-tables], CODEGEN_FLAGS)
-- 
2.21.0

