summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-04-15 15:44:17 +0200
committerBrice Goglin <bgoglin@debian.org>2009-04-15 15:49:25 +0200
commit74d27c8b5bac7c8d2ed02ba86e09bf09924ce05c (patch)
tree76c29a4f57251afef449b602f7e1ab8d494486c0
parentfaf7dfa099f5b42a703313fbd1bf8afdad07a179 (diff)
Fix build on hurd-i386
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523970
-rw-r--r--configure.ac3
-rw-r--r--hw/xfree86/os-support/bus/Pci.h2
-rw-r--r--hw/xfree86/os-support/hurd/Makefile.am1
-rw-r--r--hw/xfree86/os-support/hurd/hurd_video.c28
-rw-r--r--hw/xfree86/os-support/shared/stdResource.c2
5 files changed, 15 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 033173032..9263fc0c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1455,6 +1455,9 @@ if test "x$XORG" = xyes; then
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"
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 3a3f3d7f8..7623e9738 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -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
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index b405b1f2a..9bbe2afaf 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -5,6 +5,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \
$(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 \
diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
index 9f2e2bd01..b8b00c892 100644
--- a/hw/xfree86/os-support/hurd/hurd_video.c
+++ b/hw/xfree86/os-support/hurd/hurd_video.c
@@ -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,int Flags, unsigned long Base, unsigned long Size)
{
mach_port_t device,iopl_dev;
memory_object_t iopl_mem;
@@ -95,8 +95,8 @@ xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size)
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 @@ xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size)
return;
}
-Bool
-xf86LinearVidMem()
-{
- return(TRUE);
-}
-
/**************************************************************************
* I/O Permissions section
***************************************************************************/
@@ -143,14 +137,10 @@ xf86DisableIO()
}
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;
-}
-
diff --git a/hw/xfree86/os-support/shared/stdResource.c b/hw/xfree86/os-support/shared/stdResource.c
index 8cb101488..a4c162d97 100644
--- a/hw/xfree86/os-support/shared/stdResource.c
+++ b/hw/xfree86/os-support/shared/stdResource.c
@@ -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