summaryrefslogtreecommitdiff
path: root/xclock.c
diff options
context:
space:
mode:
authorDavid Coppa <dcoppa@gmail.com>2010-07-29 21:46:11 +0200
committerMatthieu Herrb <matthieu.herrb@laas.fr>2010-07-29 22:24:16 +0200
commiteefa040512ec291da7cc537774e14d24801b784e (patch)
treefef485c6b20461e6e1a5e923922240b183a0de24 /xclock.c
parented35a91ebdbe54befb003599364434193d5c8078 (diff)
Fix a crash on sparc64.
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. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xclock.c')
-rw-r--r--xclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xclock.c b/xclock.c
index 6b80ad0..5965a83 100644
--- a/xclock.c
+++ b/xclock.c
@@ -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,