From ca5d010292c57383da523797a095ac847e1fe103 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 9 Mar 2011 12:47:28 +0000 Subject: Enable only functions defined in windows XP Enabled IPV6 compilation --- xorg-server/hw/xwin/winauth.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xorg-server/hw/xwin') diff --git a/xorg-server/hw/xwin/winauth.c b/xorg-server/hw/xwin/winauth.c index 10bce693b..b603f70f5 100644 --- a/xorg-server/hw/xwin/winauth.c +++ b/xorg-server/hw/xwin/winauth.c @@ -32,6 +32,10 @@ #include #endif +#define GC X11_GC /* To avoid compilation errors later when including win.h (which also defines the GC type) */ +#include +#undef GC + #include "win.h" /* Includes for authorization */ @@ -136,7 +140,6 @@ GenerateAuthorization( Bool winGenerateAuthorization (void) { - Bool fFreeAuth = FALSE; SecurityAuthorizationPtr pAuth = NULL; /* Call OS layer to generate authorization key */ @@ -187,19 +190,16 @@ winGenerateAuthorization (void) pAuth)) { ErrorF ("winGenerateAuthorization - AddResource failed for auth.\n"); - fFreeAuth = TRUE; goto auth_bailout; } /* Don't free the auth data, since it is still used internally */ - pAuth = NULL; #endif return TRUE; auth_bailout: - if (fFreeAuth) - free(pAuth); + free(pAuth); return FALSE; } @@ -208,6 +208,7 @@ winGenerateAuthorization (void) void winSetAuthorization(void) { + if (g_pAuthData) XSetAuthorization (AUTH_NAME, strlen (AUTH_NAME), g_pAuthData, -- cgit v1.2.3