Fix implicit function declarations and open() mode bug. --- xf86-video-xgi-1.6.1/src/xgi_driver.c.orig 2015-08-18 00:57:47.000000000 +0200 +++ xf86-video-xgi-1.6.1/src/xgi_driver.c 2015-09-06 09:57:48.143727372 +0200 @@ -68,13 +68,16 @@ #include "mipointer.h" #include "xgi.h" +#include "xgi_accel.h" #include "xgi_regs.h" #include "xgi_vb.h" #include "xgi_dac.h" #include "vb_def.h" +#include "vb_ext.h" #include "xgi_driver.h" #include "valid_mode.h" #include "vb_i2c.h" +#include "vb_setmode.h" #define _XF86DGA_SERVER_ #include @@ -2797,7 +2800,7 @@ 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) {