Skip to content

Commit 97ffca6

Browse files
committed
Merge branch 'js/mingw-load-sys-dll'
The way DLLs are loaded on the Windows port has been improved. * js/mingw-load-sys-dll: mingw: load system libraries the recommended way
2 parents cc67487 + c6f050a commit 97ffca6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compat/mingw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,8 @@ static void ensure_socket_initialization(void)
16241624
WSAGetLastError());
16251625

16261626
for (name = libraries; *name; name++) {
1627-
ipv6_dll = LoadLibrary(*name);
1627+
ipv6_dll = LoadLibraryExA(*name, NULL,
1628+
LOAD_LIBRARY_SEARCH_SYSTEM32);
16281629
if (!ipv6_dll)
16291630
continue;
16301631

contrib/credential/wincred/git-credential-wincred.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ static CredDeleteWT CredDeleteW;
7575
static void load_cred_funcs(void)
7676
{
7777
/* load DLLs */
78-
advapi = LoadLibrary("advapi32.dll");
78+
advapi = LoadLibraryExA("advapi32.dll", NULL,
79+
LOAD_LIBRARY_SEARCH_SYSTEM32);
7980
if (!advapi)
8081
die("failed to load advapi32.dll");
8182

0 commit comments

Comments
 (0)