summaryrefslogtreecommitdiff
path: root/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h
blob: 824744f53daa8c28c28656d56d109008edbb67f4 (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
69
from alpinelinux

--- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h	2015-10-28 19:15:36.000000000 +0100
+++ xorg-server-1.18.0/hw/xfree86/common/compiler.h	2016-01-08 01:41:49.582326445 +0100
@@ -525,26 +525,26 @@ xf86WriteMmio32Le(__volatile__ void *bas
 #define PORT_SIZE short
 #endif
 
-_X_EXPORT unsigned int IOPortBase;      /* Memory mapped I/O port area */
+_X_EXPORT volatile unsigned char *ioBase;  /* Memory mapped I/O port area */
 
 static __inline__ void
 outb(unsigned PORT_SIZE port, unsigned char val)
 {
-    *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+    *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + ioBase) =
         val;
 }
 
 static __inline__ void
 outw(unsigned PORT_SIZE port, unsigned short val)
 {
-    *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+    *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + ioBase) =
         val;
 }
 
 static __inline__ void
 outl(unsigned PORT_SIZE port, unsigned int val)
 {
-    *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
+    *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + ioBase) =
         val;
 }
 
@@ -552,21 +552,21 @@ static __inline__ unsigned int
 inb(unsigned PORT_SIZE port)
 {
     return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
-                                        IOPortBase);
+                                        ioBase);
 }
 
 static __inline__ unsigned int
 inw(unsigned PORT_SIZE port)
 {
     return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
-                                         IOPortBase);
+                                         ioBase);
 }
 
 static __inline__ unsigned int
 inl(unsigned PORT_SIZE port)
 {
     return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
-                                       IOPortBase);
+                                       ioBase);
 }
 
 #if defined(__mips__)
@@ -758,7 +758,7 @@ inl(unsigned short port)
     return xf86ReadMmio32Le((void *) ioBase, port);
 }
 
-#elif defined(__arm__) && defined(__linux__)
+#elif defined(__arm__) && defined(__GLIBC__)
 
 /* for Linux on ARM, we use the LIBC inx/outx routines */
 /* note that the appropriate setup via "ioperm" needs to be done */