| From 9f3062f8069093fa37ca92fb7a45e890a7bc14be Mon Sep 17 00:00:00 2001 |
| From: Alexey Pavlov <alexpux@gmail.com> |
| Date: Mon, 15 Jan 2018 11:47:17 +0300 |
| Subject: [PATCH 7/7] Mingw load libraries not only from system32 |
| |
| --- |
| bin/winvlc.c | 2 ++ |
| src/win32/specific.c | 2 ++ |
| 2 files changed, 4 insertions(+) |
| |
| diff --git a/bin/winvlc.c b/bin/winvlc.c |
| index 8e072106f6..af22942c99 100644 |
| --- a/bin/winvlc.c |
| +++ b/bin/winvlc.c |
| @@ -164,7 +164,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, |
| * The LoadLibrary* calls from the modules and the 3rd party code |
| * will search in SYSTEM32 only |
| * */ |
| +#ifndef __MINGW32__ |
| SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32); |
| +#endif |
| /*** |
| * Load DLLs from system32 before any other folder (when possible) |
| */ |
| diff --git a/src/win32/specific.c b/src/win32/specific.c |
| index c38890febc..cdb4798f92 100644 |
| --- a/src/win32/specific.c |
| +++ b/src/win32/specific.c |
| @@ -63,6 +63,7 @@ void system_Init(void) |
| if (system_InitWSA(2, 2) && system_InitWSA(1, 1)) |
| fputs("Error: cannot initialize Winsocks\n", stderr); |
| |
| +#ifndef __MINGW32__ |
| #if !VLC_WINSTORE_APP |
| # if (_WIN32_WINNT < _WIN32_WINNT_WIN8) |
| if (GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), |
| @@ -70,6 +71,7 @@ void system_Init(void) |
| # endif /* FIXME: not reentrant */ |
| LoadLibraryFlags = LOAD_LIBRARY_SEARCH_SYSTEM32; |
| #endif |
| +#endif |
| } |
| |
| /***************************************************************************** |
| -- |
| 2.15.0 |
| |