[mupen64plus-ui-console] 133/172: Avoid crash caused by failed initial subsystem intialisation

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:07:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-ui-console.

commit 4e6c1cbb6186079e9ae9e3b4edc5253e87fb5a24
Author: Sven Eckelmann <sven at narfation.org>
Date:   Tue Jun 25 00:14:06 2013 +0200

    Avoid crash caused by failed initial subsystem intialisation
---
 debian/changelog              |  8 +++++
 debian/patches/sdl_main.patch | 68 +++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 77 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index dfb4cf6..5f06fc4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mupen64plus-ui-console (2.0~rc2+1+b39a4ffc9d54-3) UNRELEASED; urgency=low
+
+  * debian/patches:
+    - Add sdl_main.patch, Avoid crash caused by missing initial subsystem
+      startup
+
+ -- Sven Eckelmann <sven at narfation.org>  Tue, 25 Jun 2013 00:13:34 +0200
+
 mupen64plus-ui-console (2.0~rc2+1+b39a4ffc9d54-2) experimental; urgency=low
 
   * debian/rules:
diff --git a/debian/patches/sdl_main.patch b/debian/patches/sdl_main.patch
new file mode 100644
index 0000000..b34babd
--- /dev/null
+++ b/debian/patches/sdl_main.patch
@@ -0,0 +1,68 @@
+Description: Avoid crash caused by missing initial subsystem startup
+ SDL needs to overwrite the main function to initialize the subsystems on
+ some operations systems. Doing not so will cause crashes
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/projects/unix/Makefile b/projects/unix/Makefile
+index b6ee4944ce11945a9f7ba4c0b77a8210f7b9d41b..6fd25c2d218c7d0efcc739894c74070f02b0ea75 100644
+--- a/projects/unix/Makefile
++++ b/projects/unix/Makefile
+@@ -128,18 +128,6 @@ ifeq ($(OS), OSX)
+     OSX_SYSROOT := /Developer/SDKs
+   endif
+ 
+-  # The mac version of SDL requires inclusion of SDL_main in the executable
+-  ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
+-    SDL_CONFIG = $(CROSS_COMPILE)sdl-config
+-    ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
+-      $(error No SDL development libraries found!)
+-    endif
+-    SDL_CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
+-    SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
+-  endif
+-  CFLAGS += $(SDL_CFLAGS)
+-  LDLIBS += $(SDL_LDLIBS)
+-
+   ifeq ($(CPU), X86)
+     ifeq ($(ARCH_DETECTED), 64BITS)
+       CFLAGS += -pipe -arch x86_64 -mmacosx-version-min=$(OSX_SDK) -isysroot $(OSX_SYSROOT)/MacOSX$(OSX_SDK).sdk
+@@ -149,12 +137,17 @@ ifeq ($(OS), OSX)
+   endif
+ endif
+ 
+-ifeq ($(OS), MINGW)
+-  # Do NOT include SDL_main for Windows; we are building a console app!
+-  # NO -mwindows either!  (it will still be a valid 32-bit Windows program)
+-  CFLAGS += -I/usr/local/include/SDL -D_GNU_SOURCE=1
+-  LDLIBS += -L/usr/local/lib -lmingw32 -lSDL
++# test for presence of SDL
++ifeq ($(origin SDL_CFLAGS) $(origin SDL_LDLIBS), undefined undefined)
++  SDL_CONFIG = $(CROSS_COMPILE)sdl-config
++  ifeq ($(shell which $(SDL_CONFIG) 2>/dev/null),)
++    $(error No SDL development libraries found!)
++  endif
++  SDL_CFLAGS  += $(shell $(SDL_CONFIG) --cflags)
++  SDL_LDLIBS += $(shell $(SDL_CONFIG) --libs)
+ endif
++CFLAGS += $(SDL_CFLAGS)
++LDLIBS += $(SDL_LDLIBS)
+ 
+ ifeq ($(BIG_ENDIAN), 1)
+   CFLAGS += -DM64P_BIG_ENDIAN
+diff --git a/src/main.c b/src/main.c
+index c7f20e23a390a83c9508e8800449b06d93910910..ea47d866b6b157b225053906491549206725480d 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -30,10 +30,7 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ 
+-// The mac version of SDL requires inclusion of SDL_main in the executable
+-#ifdef __APPLE__
+-	 #include <SDL_main.h>
+-#endif
++#include <SDL_main.h>
+ 
+ #include "cheat.h"
+ #include "main.h"
diff --git a/debian/patches/series b/debian/patches/series
index 5a5a78d..fb0033b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 printf_fixup.patch
+sdl_main.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-ui-console.git



More information about the Pkg-games-commits mailing list