path: root/contrib/credential
diff options
authorJohannes Schindelin <>2018-10-23 10:51:49 (GMT)
committerJunio C Hamano <>2018-10-24 05:48:00 (GMT)
commitc6f050a4349339f812cdc3131ce104057424f492 (patch)
treeb96f4e292ffcbfd808dc4209c5a0dade4a49e8f6 /contrib/credential
parentc4df23f7927d8d00e666a3c8d1b3375f1dc8a3c1 (diff)
mingw: load system libraries the recommended way
When we access IPv6-related functions, we load the corresponding system library using the `LoadLibrary()` function, which is not the recommended way to load system libraries. In practice, it does not make a difference: the `ws2_32.dll` library containing the IPv6 functions is already loaded into memory, so LoadLibrary() simply reuses the already-loaded library. Still, recommended way is recommended way, so let's use that instead. While at it, also adjust the code in contrib/ that loads system libraries. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'contrib/credential')
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 86518cd..5bdad41 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,
if (!advapi)
die("failed to load advapi32.dll");