diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2010-08-07 22:10:01 +0800 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2010-08-07 22:10:01 +0800 |
commit | 88b3d47bfc70fbae15a0ffac676ebe8f474b74ee (patch) | |
tree | 33e1cfcb6272b29b1002322172704f99cf56d27a /x11-clocks/xclock | |
parent | f2dd639f5ebf24543d80bf743e2d05ad29092a3d (diff) | |
download | freebsd-ports-gnome-88b3d47bfc70fbae15a0ffac676ebe8f474b74ee.tar.gz freebsd-ports-gnome-88b3d47bfc70fbae15a0ffac676ebe8f474b74ee.tar.zst freebsd-ports-gnome-88b3d47bfc70fbae15a0ffac676ebe8f474b74ee.zip |
Fix a crash on sparc64 (and other 64-bit strict alignment archs).
The pid variable that is passed to XChangeProperty() is not a long.
The libX11 code deferences the variable as a long and on a 64-bit
sparc this must be aligned on a 8-byte boundary.
Obtained from: upstream
Diffstat (limited to 'x11-clocks/xclock')
-rw-r--r-- | x11-clocks/xclock/Makefile | 1 | ||||
-rw-r--r-- | x11-clocks/xclock/files/patch-xclock.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/x11-clocks/xclock/Makefile b/x11-clocks/xclock/Makefile index 83bf7264657a..980babfe2dbe 100644 --- a/x11-clocks/xclock/Makefile +++ b/x11-clocks/xclock/Makefile @@ -7,6 +7,7 @@ PORTNAME= xclock PORTVERSION= 1.0.4 +PORTREVISION= 1 CATEGORIES= x11-clocks MAINTAINER= x11@FreeBSD.org diff --git a/x11-clocks/xclock/files/patch-xclock.c b/x11-clocks/xclock/files/patch-xclock.c new file mode 100644 index 000000000000..4e9d5d615ac3 --- /dev/null +++ b/x11-clocks/xclock/files/patch-xclock.c @@ -0,0 +1,11 @@ +--- xclock.c.orig 2010-08-07 16:05:41.000000000 +0200 ++++ xclock.c 2010-08-07 16:05:59.000000000 +0200 +@@ -215,7 +215,7 @@ main(int argc, char *argv[]) + + #ifdef HAVE_GETPID + { +- pid_t pid = getpid(); ++ unsigned long pid = (unsigned long)getpid(); + XChangeProperty(XtDisplay(toplevel), XtWindow(toplevel), + XInternAtom(XtDisplay(toplevel), "_NET_WM_PID", False), + XA_CARDINAL, 32, PropModeReplace, |