summaryrefslogtreecommitdiff
path: root/x11/libXxf86dga/patches/patch-src_XF86DGA2.c
blob: cd6ea08e22daa01cc6efc085c3836df6c1285bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-src_XF86DGA2.c,v 1.1 2012/06/05 22:15:03 wiz Exp $

Fix build on DragonFly i386 (and probably others).
From Gustau Pérez i Querol in
http://freebsd.1045724.n5.nabble.com/Xorg-1-12-td5642201.html

--- src/XF86DGA2.c.orig	2012-03-08 05:35:46.000000000 +0000
+++ src/XF86DGA2.c
@@ -928,7 +928,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)(unsigned long)base);
     if (pMap->virtual == (void *)-1)
 	return False;
     mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE);