From d8f8629b1bf566e1dada7515e9b146c69e5d9757 Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Mon, 7 Mar 2022 15:16:15 +0000 Subject: patch 8.2.4524: MS-Windows: cannot build with some sodium libraries Problem: MS-Windows: cannot build with some sodium libraries. Solution: Make the DLL name configuragle. Add build instructions. (Ken Takata, closes #9905) --- src/crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crypt.c') diff --git a/src/crypt.c b/src/crypt.c index d66e50cc4..86f484636 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -251,7 +251,7 @@ static struct { sodium_runtime_link_init(int verbose) { static HINSTANCE hsodium = NULL; - const char *libname = "libsodium.dll"; + const char *libname = DYNAMIC_SODIUM_DLL; int i; if (hsodium != NULL) @@ -270,7 +270,7 @@ sodium_runtime_link_init(int verbose) if ((*sodium_funcname_table[i].ptr = symbol_from_dll(hsodium, sodium_funcname_table[i].name)) == NULL) { - FreeLibrary(hsodium); + close_dll(hsodium); hsodium = NULL; if (verbose) semsg(_(e_could_not_load_library_function_str), sodium_funcname_table[i].name); -- cgit v1.2.1