summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 15:43:48 +0900
committerJunio C Hamano <gitster@pobox.com>2018-10-30 15:43:48 +0900
commit97ffca6cc74e5313a7d503f76fe2a99f13750c69 (patch)
tree905381a7a4b8a3b2c49a3b0781adaa58808a8109
parentcc6748720f9014b2c2cea8a603acd9ff6a62b87c (diff)
parentc6f050a4349339f812cdc3131ce104057424f492 (diff)
downloadgit-97ffca6cc74e5313a7d503f76fe2a99f13750c69.tar.gz
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
-rw-r--r--compat/mingw.c3
-rw-r--r--contrib/credential/wincred/git-credential-wincred.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 6c3c4ca5a6..81ef24286a 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -1624,7 +1624,8 @@ static void ensure_socket_initialization(void)
WSAGetLastError());
for (name = libraries; *name; name++) {
- ipv6_dll = LoadLibrary(*name);
+ ipv6_dll = LoadLibraryExA(*name, NULL,
+ LOAD_LIBRARY_SEARCH_SYSTEM32);
if (!ipv6_dll)
continue;
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 86518cd93d..5bdad41de1 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -75,7 +75,8 @@ static CredDeleteWT CredDeleteW;
static void load_cred_funcs(void)
{
/* load DLLs */
- advapi = LoadLibrary("advapi32.dll");
+ advapi = LoadLibraryExA("advapi32.dll", NULL,
+ LOAD_LIBRARY_SEARCH_SYSTEM32);
if (!advapi)
die("failed to load advapi32.dll");