[PATCH] fix build (server libpciaccess support and newer glibc)

Rémi Cardona remi at gentoo.org
Fri Aug 14 01:53:28 PDT 2009


---
 configure.ac     |    5 +++++
 src/xgi_driver.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index d7e088f..780ce25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,10 +105,15 @@ if test "x$DRI" = xyes; then
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
 fi
 
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+
 AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
               [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
               [#include "xorg-server.h"])
 
+CPPFLAGS="$SAVE_CPPFLAGS"
+
 if test "x$XSERVER_LIBPCIACCESS" = xyes; then
     PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
 fi
diff --git a/src/xgi_driver.c b/src/xgi_driver.c
index 950e69e..3ec7d45 100644
--- a/src/xgi_driver.c
+++ b/src/xgi_driver.c
@@ -2590,7 +2590,7 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
     FbDevExist = FALSE;
    if((pXGI->Chipset != PCI_CHIP_XGIXG20)&&(pXGI->Chipset != PCI_CHIP_XGIXG21)&&( pXGI->Chipset != PCI_CHIP_XGIXG27 ))
    {
-        if ((fd = open("/dev/fb", 'r')) != -1) {
+        if ((fd = open("/dev/fb", O_RDONLY)) != -1) {
             PDEBUG(ErrorF("--- open /dev/fb....   \n"));
             ioctl(fd, FBIOGET_FSCREENINFO, &fix);
             if (fix.accel == FB_ACCEL_XGI_GLAMOUR) {
-- 
1.6.4





More information about the xorg-devel mailing list