From d1ccf784df099a8a5733b820fe8ab1d69b0d660b Mon Sep 17 00:00:00 2001
From: Thomas Faber <thfabba@gmx.de>
Date: Sun, 17 Jun 2012 15:51:56 +0200
Subject: include: Make IMAGE_COR20_HEADER declaration compatible with PSDK
 headers.

---
 dlls/fusion/tests/asmcache.c |    2 +-
 include/winnt.h              |    5 ++++-
 tools/winedump/pe.c          |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c
index 890bd9c..e97cfbe 100644
--- a/dlls/fusion/tests/asmcache.c
+++ b/dlls/fusion/tests/asmcache.c
@@ -412,7 +412,7 @@ static struct _tagASSEMBLY
         5, /* MinorRuntimeVersion */
         { 0x2188, 0x1B4 }, /* MetaData */
         COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_STRONGNAMESIGNED, /* Flags */
-        0, /* EntryPointToken */
+        { 0 }, /* EntryPointToken */
         { 0x20D0, 0xB8 }, /* Resources */
         { 0x2050, 0x80 }, /* StrongNameSignature */
         { 0 }, /* CodeManagerTable */
diff --git a/include/winnt.h b/include/winnt.h
index 6903d34..16cc4e9 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -3429,7 +3429,10 @@ typedef struct IMAGE_COR20_HEADER
 
     IMAGE_DATA_DIRECTORY MetaData;
     DWORD Flags;
-    DWORD EntryPointToken;
+    union {
+        DWORD EntryPointToken;
+        DWORD EntryPointRVA;
+    } DUMMYUNIONNAME;
 
     IMAGE_DATA_DIRECTORY Resources;
     IMAGE_DATA_DIRECTORY StrongNameSignature;
diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index f005b49..c655451 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -966,7 +966,7 @@ static void dump_dir_clr_header(void)
     print_dword( "Header Size", dir->cb );
     print_ver( "Required runtime version", dir->MajorRuntimeVersion, dir->MinorRuntimeVersion );
     print_clrflags( "Flags", dir->Flags );
-    print_dword( "EntryPointToken", dir->EntryPointToken );
+    print_dword( "EntryPointToken", dir->u.EntryPointToken );
     printf("\n");
     printf( "CLR Data Directory\n" );
     print_clrdirectory( "MetaData", &dir->MetaData );
-- 
1.7.10.msysgit.1
