summaryrefslogtreecommitdiff
path: root/debian/patches/20_hurd-i386.diff
blob: fc54f4cab76974762a95a0fb6fa3107bdea09b6e (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From: Samuel Thibault <samuel.thibault@ens-lyon.org>

Bug#523970: xorg-server: FTBFS on hurd-i386

Index: xorg-server/hw/xfree86/os-support/bus/Pci.h
===================================================================
--- xorg-server.orig/hw/xfree86/os-support/bus/Pci.h	2009-04-11 15:23:16.000000000 -0400
+++ xorg-server/hw/xfree86/os-support/bus/Pci.h	2009-05-11 21:50:11.000000000 -0400
@@ -169,7 +169,7 @@
 #endif /* !defined(DEBUGPCI) */
 
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
-	defined(__DragonFly__) || defined(__sun)
+	defined(__DragonFly__) || defined(__sun) || defined(__GNU__)
 #define ARCH_PCI_INIT bsdPciInit
 #endif
 
Index: xorg-server/configure.ac
===================================================================
--- xorg-server.orig/configure.ac	2009-05-11 21:49:28.000000000 -0400
+++ xorg-server/configure.ac	2009-05-11 21:50:11.000000000 -0400
@@ -1354,6 +1354,9 @@
 	  gnu*)
 	  	XORG_OS="gnu"
 		XORG_OS_SUBDIR="hurd"
+		# Use the same stubs as BSD for old functions, since we now
+		# use libpciaccess for PCI
+		xorg_bus_bsdpci="yes"
 		;;
 	  *)
 	  	XORG_OS="unknown"
Index: xorg-server/hw/xfree86/os-support/hurd/Makefile.am
===================================================================
--- xorg-server.orig/hw/xfree86/os-support/hurd/Makefile.am	2009-04-11 15:23:16.000000000 -0400
+++ xorg-server/hw/xfree86/os-support/hurd/Makefile.am	2009-05-11 21:50:11.000000000 -0400
@@ -5,6 +5,7 @@
 		$(srcdir)/../shared/VTsw_noop.c \
 		$(srcdir)/../shared/posix_tty.c \
 		$(srcdir)/../shared/stdResource.c \
+		$(srcdir)/../shared/vidmem.c \
 		$(srcdir)/../shared/sigiostubs.c \
 		$(srcdir)/../shared/pm_noop.c \
 		$(srcdir)/../shared/kmod_noop.c \
Index: xorg-server/hw/xfree86/os-support/shared/stdResource.c
===================================================================
--- xorg-server.orig/hw/xfree86/os-support/shared/stdResource.c	2009-04-11 15:23:16.000000000 -0400
+++ xorg-server/hw/xfree86/os-support/shared/stdResource.c	2009-05-11 21:50:11.000000000 -0400
@@ -44,7 +44,7 @@
 #include "bus/Pci.h"
 
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
-	defined(__DragonFly__) || defined(__sun)
+	defined(__DragonFly__) || defined(__sun) || defined(__GNU__)
 #define xf86StdAccResFromOS xf86AccResFromOS
 #endif
 
Index: xorg-server/hw/xfree86/os-support/hurd/hurd_video.c
===================================================================
--- xorg-server.orig/hw/xfree86/os-support/hurd/hurd_video.c	2009-04-11 15:23:16.000000000 -0400
+++ xorg-server/hw/xfree86/os-support/hurd/hurd_video.c	2009-05-11 21:50:11.000000000 -0400
@@ -41,8 +41,8 @@
 /**************************************************************************
  * Video Memory Mapping section                                            
  ***************************************************************************/
-pointer 
-xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size)
+static pointer 
+mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags)
 {
     mach_port_t device,iopl_dev;
     memory_object_t iopl_mem;
@@ -95,8 +95,8 @@
     return (pointer)addr;
 }
 
-void 
-xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size)
+static void 
+unmapVidMem(int ScreenNum,pointer Base,unsigned long Size)
 {
     kern_return_t err = vm_deallocate(mach_task_self(), (int)Base, Size);
     if( err )
@@ -107,12 +107,6 @@
     return;
 }
 
-Bool 
-xf86LinearVidMem()
-{
-    return(TRUE);
-}
-
 /**************************************************************************
  * I/O Permissions section                                                 
  ***************************************************************************/
@@ -143,14 +137,10 @@
 }
 
 void
-xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base,
-	unsigned long Size)
+xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 {
+	pVidMem->linearSupported = TRUE;
+	pVidMem->mapMem = mapVidMem;
+	pVidMem->unmapMem = unmapVidMem;
+	pVidMem->initialised = TRUE;
 }
-
-Bool
-xf86CheckMTRR(int s)
-{
-	return FALSE;
-}
-