From a7927d14f267848de94cbd98732ffa0079706d54 Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 21 Jul 2008 17:58:44 +0000 Subject: [PATCH] Fix an egregious LP64 error. From Debian bug #394366, submitted by Stephen McCamant. --- x11/xloadimage/Makefile | 4 ++-- x11/xloadimage/patches/patch-root_c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 x11/xloadimage/patches/patch-root_c diff --git a/x11/xloadimage/Makefile b/x11/xloadimage/Makefile index 1cf2a50ad81..af85da1a43a 100644 --- a/x11/xloadimage/Makefile +++ b/x11/xloadimage/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.33 2008/07/16 14:38:32 naddy Exp $ +# $OpenBSD: Makefile,v 1.34 2008/07/21 17:58:44 naddy Exp $ COMMENT= graphics file viewer for X11 @@ -6,7 +6,7 @@ VERSION= 4.1 REVISION= 16 # Debian DISTNAME= xloadimage.${VERSION} -PKGNAME= xloadimage-${VERSION}.${REVISION}p0 +PKGNAME= xloadimage-${VERSION}.${REVISION}p1 CATEGORIES= x11 graphics FAKE= lib diff --git a/x11/xloadimage/patches/patch-root_c b/x11/xloadimage/patches/patch-root_c new file mode 100644 index 00000000000..0f0c74795e2 --- /dev/null +++ b/x11/xloadimage/patches/patch-root_c @@ -0,0 +1,24 @@ +$OpenBSD: patch-root_c,v 1.1 2008/07/21 17:58:44 naddy Exp $ +--- root.c.orig Mon Jul 21 19:47:22 2008 ++++ root.c Mon Jul 21 19:48:18 2008 +@@ -68,16 +68,16 @@ freePrevious(dpy, w) + Pixmap *pm; + Atom actual_type; /* NOTUSED */ + int format; +- int nitems; +- int bytes_after; ++ long nitems; ++ long bytes_after; + + /* intern the property name */ + Atom atom = XInternAtom(dpy, RETAIN_PROP_NAME, 0); + + /* look for existing resource allocation */ + if ((XGetWindowProperty(dpy, w, atom, 0, 1, 1/*delete*/, +- AnyPropertyType, &actual_type, &format, (unsigned long *)&nitems, +- (unsigned long *)&bytes_after, (unsigned char **)&pm) == Success) && ++ AnyPropertyType, &actual_type, &format, &nitems, ++ &bytes_after, (unsigned char **)&pm) == Success) && + nitems == 1) { + if ((actual_type == XA_PIXMAP) && (format == 32) && + (nitems == 1) && (bytes_after == 0)) {