diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-01 13:36:28 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-01 13:37:31 +0100 |
commit | 63518c42234001ec96f638af5732c09079a3d682 (patch) | |
tree | 0842cc6bbe4eda6ebfadb2a0a9f21bad9997982e | |
parent | 7976f5144d42a03ccd027908252a600db2631054 (diff) |
dri: Build fix for xserver-1.7.7
Back in the olden days before the introduction of dixRegisterPrivate().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_dri.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 90f9b8fe..1227dbb0 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -71,7 +71,11 @@ typedef struct { PixmapPtr pixmap; } I830DRI2BufferPrivateRec, *I830DRI2BufferPrivatePtr; +#if HAS_DEVPRIVATEKEYREC static DevPrivateKeyRec i830_client_key; +#else +static int i830_client_key; +#endif static uint32_t pixmap_flink(PixmapPtr pixmap) { @@ -705,7 +709,11 @@ i830_dri2_register_frame_event_resource_types(void) static XID get_client_id(ClientPtr client) { +#if HAS_DIXREGISTERPRIVATEKEY XID *ptr = dixGetPrivateAddr(&client->devPrivates, &i830_client_key); +#else + XID *ptr = dixLookupPrivate(&client->devPrivates, &i830_client_key); +#endif if (*ptr == 0) *ptr = FakeClientID(client->index); return *ptr; @@ -1480,8 +1488,13 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) return FALSE; } +#if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&i830_client_key, PRIVATE_CLIENT, sizeof(XID))) return FALSE; +#else + if (!dixRequestPrivate(&i830_client_key, sizeof(XID))) + return FALSE; +#endif #if DRI2INFOREC_VERSION >= 4 |