freebsd-ports/x11-drivers/xf86-video-s3virge/files/patch-git_02_47f4369
Baptiste Daroussin 6702838d96 mport few patches from upstream to allow building with newer xorg
Note that those drivers are barely maintained and might disappear in the futur

PR:		216290
Submitted by:	matthew@reztek.cz
2017-01-23 22:57:06 +00:00

24 lines
826 B
Text

From 47f43694645f3e6347b536d5e3fb2fee56e715ab Mon Sep 17 00:00:00 2001
From: Thomas Klausner <wiz@NetBSD.org>
Date: Mon, 28 Sep 2015 22:49:22 +0200
Subject: Add cast to remove a warning on 32-bit machines.
PCI_REGION_BASE returns a 64-bit value, which needs to be converted
down to 32-bit before it can be put into a 32-bit pointer.
diff --git a/src/s3v_dga.c b/src/s3v_dga.c
index 0e603cf..0ab374d 100644
--- src/s3v_dga.c
+++ src/s3v_dga.c
@@ -337,7 +337,7 @@ S3V_OpenFramebuffer(
S3VPtr ps3v = S3VPTR(pScrn);
*name = NULL; /* no special device */
- *mem = (unsigned char*)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM);
+ *mem = (unsigned char*)(uintptr_t)PCI_REGION_BASE(ps3v->PciInfo, 0, REGION_MEM);
*size = ps3v->videoRambytes;
*offset = 0;
*flags = DGA_NEED_ROOT;
--
cgit v0.10.2