aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-07-06 20:07:46 +0800
committerjbeich <jbeich@FreeBSD.org>2017-07-06 20:07:46 +0800
commit5b24de3e369818c48397ee0e175f4260d5f2a883 (patch)
tree35accc40976e02a786895c09d39dbfa8ee1322b0
parent3fdd6140e17bd8d543107edecace008ec28a32a2 (diff)
downloadfreebsd-ports-gnome-5b24de3e369818c48397ee0e175f4260d5f2a883.tar.gz
freebsd-ports-gnome-5b24de3e369818c48397ee0e175f4260d5f2a883.tar.zst
freebsd-ports-gnome-5b24de3e369818c48397ee0e175f4260d5f2a883.zip
devel/sdl12: backport crashfix for sparc64
Obtained from: upstream (via PkgSrc and OpenBSD Ports) MFH: 2017Q3 (no hardware to confirm)
-rw-r--r--devel/sdl12/Makefile2
-rw-r--r--devel/sdl12/files/patch-src_video_x11_SDL__x11video.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile
index a321839adc30..561da3d16cd5 100644
--- a/devel/sdl12/Makefile
+++ b/devel/sdl12/Makefile
@@ -3,7 +3,7 @@
PORTNAME= sdl
PORTVERSION= 1.2.15
-PORTREVISION= 9
+PORTREVISION= 10
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
diff --git a/devel/sdl12/files/patch-src_video_x11_SDL__x11video.c b/devel/sdl12/files/patch-src_video_x11_SDL__x11video.c
new file mode 100644
index 000000000000..dbc0a7eefe85
--- /dev/null
+++ b/devel/sdl12/files/patch-src_video_x11_SDL__x11video.c
@@ -0,0 +1,30 @@
+https://bugzilla.libsdl.org/show_bug.cgi?id=1427
+https://hg.libsdl.org/SDL/rev/57a55e457ef6
+
+--- src/video/x11/SDL_x11video.c.orig 2012-01-19 06:30:06 UTC
++++ src/video/x11/SDL_x11video.c
+@@ -418,16 +418,21 @@ static void create_aux_windows(_THIS)
+ }
+
+ {
+- pid_t pid = getpid();
++ union align_pid {
++ pid_t pid;
++ long dummy;
++ } a_pid;
+ char hostname[256];
++
++ a_pid.pid = getpid();
+
+- if (pid > 0 && gethostname(hostname, sizeof(hostname)) > -1) {
++ if (a_pid.pid > 0 && gethostname(hostname, sizeof(hostname)) > -1) {
+ Atom _NET_WM_PID = XInternAtom(SDL_Display, "_NET_WM_PID", False);
+ Atom WM_CLIENT_MACHINE = XInternAtom(SDL_Display, "WM_CLIENT_MACHINE", False);
+
+ hostname[sizeof(hostname)-1] = '\0';
+ XChangeProperty(SDL_Display, WMwindow, _NET_WM_PID, XA_CARDINAL, 32,
+- PropModeReplace, (unsigned char *)&pid, 1);
++ PropModeReplace, (unsigned char *)&(a_pid.pid), 1);
+ XChangeProperty(SDL_Display, WMwindow, WM_CLIENT_MACHINE, XA_STRING, 8,
+ PropModeReplace, (unsigned char *)hostname, SDL_strlen(hostname));
+ }