summaryrefslogtreecommitdiffstats
path: root/abs/core/xf86-video-unichrome/fix-defines.patch
blob: 5b9f04020aa23cd7bc04868db899dfb4ce9565b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From: Luc Verhaegen <libv@skynet.be>
Date: Wed, 6 Dec 2006 23:16:01 +0000 (+0100)
Subject: Fix build issues due to hard uint32_t and Bool #defines.
X-Git-Url: http://gitweb.freedesktop.org/?p=users/libv/xf86-video-unichrome.git;a=commitdiff;h=13c214345787a3340f230e77b7770b7c2d115c85

Fix build issues due to hard uint32_t and Bool #defines.

Ported from xf86-video_via, which was by Matthias Hopf.
---

--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,7 @@ sdkdir=$(pkg-config --variable=sdkdir xo
 
 # Checks for header files.
 AC_HEADER_STDC
+AC_CHECK_HEADERS([inttypes.h])
 
 if test "$DRI" != no; then
         AC_CHECK_FILE([${sdkdir}/dri.h],
--- a/src/via_dri.h
+++ b/src/via_dri.h
@@ -35,7 +35,7 @@
 #define VIA_DRIDDX_VERSION_MINOR  0
 #define VIA_DRIDDX_VERSION_PATCH  0
 
-#ifndef XFree86Server
+#if !defined(XFree86Server) && !defined(_XTYPEDEF_BOOL)
 typedef int Bool;
 #endif
 
--- a/src/via_drmclient.h
+++ b/src/via_drmclient.h
@@ -27,7 +27,13 @@
 #include "drm.h"
 #include "xf86drm.h"
 
-typedef CARD32 uint32_t;
+#ifdef HAVE_INTTYPES_H
+#    include <inttypes.h>
+#else
+#    ifndef uint32_t
+#        define uint32_t CARD32
+#    endif
+#endif
 
 #ifdef X_NEED_DRMLOCK
 #define drm_hw_lock_t drmLock
--- a/src/via_video.c
+++ b/src/via_video.c
@@ -367,7 +367,7 @@ ViaSwovCopyDMA(VIAPtr pVia, struct ViaMe
     if (error) {
         xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: DMA copy sheduling failed: %d.\n",
                    __FUNCTION__, error);
-        xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: Copying %p to %08lX\n",
+        xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: Copying %p to %08X\n",
                    __func__, blit.mem_addr, blit.fb_addr);
         if (new_buf)
             xfree(new_buf);
@@ -391,7 +391,7 @@ ViaSwovCopyDMA(VIAPtr pVia, struct ViaMe
     if (error) {
         xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: DMA copy sync failed: %d - %d\n",
                    __FUNCTION__, error, -EAGAIN);
-        xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: Copying %p to %08lX\n",
+        xf86DrvMsg(pVia->scrnIndex, X_ERROR, "%s: Copying %p to %08X\n",
                    __func__, blit.mem_addr, blit.fb_addr);
         return FALSE;
     }