Fix an egregious LP64 error.

From Debian bug #394366, submitted by Stephen McCamant.
This commit is contained in:
naddy 2008-07-21 17:58:44 +00:00
parent 128baba7e1
commit a7927d14f2
2 changed files with 26 additions and 2 deletions

View File

@ -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

View File

@ -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)) {