summaryrefslogtreecommitdiff
path: root/lib/libXxf86dga
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-10 23:31:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-03-10 23:31:34 +0000
commit6f037d78fb8ca9badfe780f0ebb37a271a8644c5 (patch)
tree7141f1f4a0ea9eef8c565a264c29bab0fa1d0c89 /lib/libXxf86dga
parenta9c72aaf430e7321f183b5065bc0f7fb181583eb (diff)
Fix build on 32 bit architectures. Problem noticed by naddy@.
Diffstat (limited to 'lib/libXxf86dga')
-rw-r--r--lib/libXxf86dga/src/XF86DGA2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libXxf86dga/src/XF86DGA2.c b/lib/libXxf86dga/src/XF86DGA2.c
index e81b4866c..39ad1ccfe 100644
--- a/lib/libXxf86dga/src/XF86DGA2.c
+++ b/lib/libXxf86dga/src/XF86DGA2.c
@@ -20,6 +20,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include <stdio.h>
+#include <stdint.h>
/* If you change this, change the Bases[] array below as well */
@@ -928,7 +929,7 @@ DGAMapPhysical(
if ((pMap->fd = open(name, O_RDWR)) < 0)
return False;
pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE,
- MAP_FILE | MAP_SHARED, pMap->fd, (off_t)base);
+ MAP_FILE | MAP_SHARED, pMap->fd, (off_t)(uintptr_t)base);
if (pMap->virtual == (void *)-1)
return False;
mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE);