blob: 97f237d79c30dcc6a22b6e7dead5211858d37c11 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- dlls/ntdll/unix/loader.c.orig 2024-04-05 17:03:05 UTC
+++ dlls/ntdll/unix/loader.c
@@ -480,6 +480,21 @@ char *get_alternate_wineloader( WORD machine )
if (machine == current_machine) return NULL;
+ char* wineserver_path = getenv("WINESERVER");
+ if (wineserver_path != NULL && wineserver_path[0] == '/') {
+ char* s = remove_tail(wineserver_path, "server");
+ if (s != NULL) {
+ if (machine == IMAGE_FILE_MACHINE_AMD64) {
+ ret = malloc(strlen(s) + 3);
+ strcpy(ret, s);
+ strcat(ret, "64");
+ } else {
+ ret = s;
+ }
+ return ret;
+ }
+ }
+
/* try the 64-bit loader */
if (current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64)
{
|