fix-old-cpp-macros_sis.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Upstream: no (Too lazy)
  2. Reason: Fixes build with new GCC by fixing old CPP macros
  3. diff --git a/src/sis_driver.c b/src/sis_driver.c
  4. index 51c9660..5e2eba2 100644
  5. --- a/src/sis_driver.c
  6. +++ b/src/sis_driver.c
  7. @@ -4166,7 +4166,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
  8. biossize = 0x8000;
  9. break;
  10. }
  11. -#if XSERVER_LIBPCIACCESS
  12. +#if defined(XSERVER_LIBPCIACCESS)
  13. if(readpci) {
  14. pSiS->PciInfo->rom_size = biossize;
  15. pci_device_read_rom(pSiS->PciInfo, pSiS->BIOS);
  16. diff --git a/src/sis_vga.c b/src/sis_vga.c
  17. index 8b625d2..c40c140 100644
  18. --- a/src/sis_vga.c
  19. +++ b/src/sis_vga.c
  20. @@ -1715,7 +1715,7 @@ SiSVGAMapMem(ScrnInfoPtr pScrn)
  21. if(pSiS->VGAMapPhys == 0) pSiS->VGAMapPhys = 0xA0000;
  22. #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
  23. -#if XSERVER_LIBPCIACCESS
  24. +#if defined(XSERVER_LIBPCIACCESS)
  25. (void) pci_device_map_legacy(pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize,
  26. PCI_DEV_MAP_FLAG_WRITABLE, &pSiS->VGAMemBase);
  27. #else
  28. @@ -1737,7 +1737,7 @@ SiSVGAUnmapMem(ScrnInfoPtr pScrn)
  29. if(pSiS->VGAMemBase == NULL) return;
  30. -#if XSERVER_LIBPCIACCESS
  31. +#if defined(XSERVER_LIBPCIACCESS)
  32. (void) pci_device_unmap_legacy(pSiS->PciInfo, pSiS->VGAMemBase, pSiS->VGAMapSize);
  33. #else
  34. xf86UnMapVidMem(pScrn->scrnIndex, pSiS->VGAMemBase, pSiS->VGAMapSize);