winex11.drv: Fix compilation on systems that don't support nameless unions.

Francois Gouget fgouget at free.fr
Sun Aug 29 16:40:21 CDT 2010


---
 dlls/winex11.drv/xdnd.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index 526066f..de689fd 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -29,6 +29,8 @@
 #include <stdarg.h>
 #include <stdio.h>
 
+#define NONAMELESSUNION
+
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
@@ -996,10 +998,10 @@ static HRESULT WINAPI XDNDDATAOBJECT_GetData(IDataObject *dataObject,
             if (current->cf_win == formatEtc->cfFormat)
             {
                 pMedium->tymed = TYMED_HGLOBAL;
-                pMedium->hGlobal = HeapAlloc(GetProcessHeap(), 0, current->size);
-                if (pMedium->hGlobal == NULL)
+                pMedium->u.hGlobal = HeapAlloc(GetProcessHeap(), 0, current->size);
+                if (pMedium->u.hGlobal == NULL)
                     return E_OUTOFMEMORY;
-                memcpy(pMedium->hGlobal, current->data, current->size);
+                memcpy(pMedium->u.hGlobal, current->data, current->size);
                 pMedium->pUnkForRelease = 0;
                 return S_OK;
             }
-- 
1.7.1




More information about the wine-patches mailing list