libxshmfence has an unfortunate 'int32_t' type for the mapped fence; it will change to exposing a 'struct shmfence' instead, which is nice and opaque and offers fine type checking across the API.
This patch checks to see if that new version of libxshmfence has been installed and uses the new type when available. Signed-off-by: Keith Packard <[email protected]> --- miext/sync/misyncshm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/miext/sync/misyncshm.c b/miext/sync/misyncshm.c index 59f99fb..ec12423 100644 --- a/miext/sync/misyncshm.c +++ b/miext/sync/misyncshm.c @@ -37,9 +37,15 @@ static DevPrivateKeyRec syncShmFencePrivateKey; +#if HAVE_STRUCT_XSHMFENCE +typedef struct xshmfence *fence_type; +#else +typedef int32_t *fence_type; +#endif + typedef struct _SyncShmFencePrivate { - int32_t *fence; - int fd; + fence_type fence; + int fd; } SyncShmFencePrivateRec, *SyncShmFencePrivatePtr; #define SYNC_FENCE_PRIV(pFence) \ -- 1.8.4.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
