From: Brendan Shanks bshanks@codeweavers.com
--- configure.ac | 1 + dlls/ntdll/unix/loader.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac index db0c88a04f4..1ed6bf059ea 100644 --- a/configure.ac +++ b/configure.ac @@ -2042,6 +2042,7 @@ if test "$wine_use_preloader" = "yes" then test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + AC_DEFINE(USE_PRELOADER, 1, [Define to 1 if the preloader is being used.]) fi
dnl **** Check for functions **** diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 8cf6abed3da..b97954a8182 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -147,7 +147,7 @@ SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4] = static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2))); #endif
-#if defined(linux) || defined(__APPLE__) +#ifdef USE_PRELOADER static const BOOL use_preloader = TRUE; #else static const BOOL use_preloader = FALSE; @@ -2074,7 +2074,7 @@ static int pre_exec(void) return 1; /* we have a preloader on x86-64/arm64 */ }
-#elif defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__)) +#elif defined(__APPLE__) && defined(USE_PRELOADER)
static int pre_exec(void) {