[PATCH xf86-video-chips] Build fixes for ABI_VIDEODRV_VERSION 12

Mark Kettenis mark.kettenis at xs4all.nl
Sat Sep 24 03:11:52 PDT 2011


> From: Jeremy Huddleston <jeremyhu at apple.com>
> Date: Sat, 24 Sep 2011 00:03:45 -0700
> 
> 1) Include <pciaccess.h> for IOADDRESS

How does this help you?  Nothing in libpciaccess defines IOADDRESS,
and adding that typedef to <pciaccess.h> seems wrong to me.  See my
previous mail for an easier solution.

> 2) Use CARD32 instead of PCITAG

See comment inline below.

>  src/ct_driver.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/ct_driver.h b/src/ct_driver.h
> index 10a24d4..06c8aa8 100644
> --- a/src/ct_driver.h
> +++ b/src/ct_driver.h
> @@ -271,7 +272,11 @@ typedef struct {
>  
>  typedef struct _CHIPSRec {
>      pciVideoPtr		PciInfo;
> +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
>      PCITAG		PciTag;
> +#else
> +    CARD32		PciTag;
> +#endif

The PciTag member is only used in the !XSERVER_LIBPCIACCESS case, so a
better slution would be:

 typedef struct _CHIPSRec {
     pciVideoPtr		PciInfo;
+#ifndef XSERVER_LIBPCIACCESS
     PCITAG		PciTag;
+#endif
     int			Chipset;
     EntityInfoPtr       pEnt;
     IOADDRESS		PIOBase;



More information about the xorg-devel mailing list