Hi,
This patch fixes a crash on sparc64 with xenocara/app/xclock.
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.
Because it is an int, it gets aligned on a 4-byte boundary, causing a
bus error.
Cheers,
David
Index: xclock.c
===================================================================
RCS file: /cvs/xenocara/app/xclock/xclock.c,v
retrieving revision 1.2
diff -u -p -r1.2 xclock.c
--- xclock.c 26 Sep 2009 14:35:39 -0000 1.2
+++ xclock.c 29 Jul 2010 12:37:49 -0000
@@ -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,