mirror of
https://git.freebsd.org/ports.git
synced 2025-05-30 09:56:43 -04:00
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
This commit is contained in:
parent
f2dd639f5e
commit
88b3d47bfc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258873
2 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
PORTNAME= xclock
|
PORTNAME= xclock
|
||||||
PORTVERSION= 1.0.4
|
PORTVERSION= 1.0.4
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= x11-clocks
|
CATEGORIES= x11-clocks
|
||||||
|
|
||||||
MAINTAINER= x11@FreeBSD.org
|
MAINTAINER= x11@FreeBSD.org
|
||||||
|
|
11
x11-clocks/xclock/files/patch-xclock.c
Normal file
11
x11-clocks/xclock/files/patch-xclock.c
Normal file
|
@ -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,
|
Loading…
Add table
Reference in a new issue