setupapi: Add support for more architectures when building fake dlls

André Hentschel nerv at dawncrow.de
Sat Mar 22 10:41:30 CDT 2014


I messed up a setup on ARM and Wine mostly behaved strange because it built x86 fakedlls which it refused to "run"

---
 dlls/setupapi/fakedll.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c
index 3528e79..e74a306 100644
--- a/dlls/setupapi/fakedll.c
+++ b/dlls/setupapi/fakedll.c
@@ -275,8 +275,14 @@ static BOOL build_fake_dll( HANDLE file, const WCHAR *name )
 
     nt = info.nt = (IMAGE_NT_HEADERS *)(buffer + lfanew);
     /* some fields are copied from the source dll */
-#ifdef _WIN64
+#if defined __x86_64__
     nt->FileHeader.Machine = IMAGE_FILE_MACHINE_AMD64;
+#elif defined __aarch64__
+    nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARMNT;
+#elif defined __arm__
+    nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARM64;
+#elif defined __powerpc__
+    nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC;
 #else
     nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386;
 #endif
-- 
1.8.1.2




More information about the wine-patches mailing list