From 891d3ef525ed4e87131df5d972f22b86779b595a Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 31 Aug 2009 11:53:00 +0200 Subject: [PATCH] rpcrt4: Fix compilation on systems that don't support nameless unions. --- dlls/rpcrt4/ndr_marshall.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 9846d9e2e7b..d1b57fd187a 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -32,6 +32,7 @@ #include #include +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -4379,15 +4380,15 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M if (level != 1) return RPC_S_INVALID_ARG; - memset(&umi->Level1, 0, sizeof(umi->Level1)); + memset(&umi->u1.Level1, 0, sizeof(umi->u1.Level1)); umi->InformationLevel = level; if (umcb->Signature != USER_MARSHAL_CB_SIGNATURE) return RPC_S_INVALID_ARG; - umi->Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate; - umi->Level1.pfnFree = umcb->pStubMsg->pfnFree; - umi->Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer; + umi->u1.Level1.pfnAllocate = umcb->pStubMsg->pfnAllocate; + umi->u1.Level1.pfnFree = umcb->pStubMsg->pfnFree; + umi->u1.Level1.pRpcChannelBuffer = umcb->pStubMsg->pRpcChannelBuffer; switch (umcb->CBType) { @@ -4403,8 +4404,8 @@ RPC_STATUS RPC_ENTRY NdrGetUserMarshalInfo(ULONG *flags, ULONG level, NDR_USER_M umcb->pStubMsg->Buffer > buffer_end) return ERROR_INVALID_USER_BUFFER; - umi->Level1.Buffer = umcb->pStubMsg->Buffer; - umi->Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer; + umi->u1.Level1.Buffer = umcb->pStubMsg->Buffer; + umi->u1.Level1.BufferSize = buffer_end - umcb->pStubMsg->Buffer; break; } case USER_MARSHAL_CB_BUFFER_SIZE: