summaryrefslogtreecommitdiffstats
path: root/src/crypt.c
diff options
context:
space:
mode:
authorK.Takata <kentkt@csc.jp>2022-03-07 15:16:15 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-07 15:16:15 +0000
commitd8f8629b1bf566e1dada7515e9b146c69e5d9757 (patch)
treeb6206939ce6839fd684f76c620b7a17b753739fe /src/crypt.c
parent6ca883dd8a585a85acdf9303b434211ea91872a7 (diff)
patch 8.2.4524: MS-Windows: cannot build with some sodium librariesv8.2.4524
Problem: MS-Windows: cannot build with some sodium libraries. Solution: Make the DLL name configuragle. Add build instructions. (Ken Takata, closes #9905)
Diffstat (limited to 'src/crypt.c')
-rw-r--r--src/crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypt.c b/src/crypt.c
index d66e50cc48..86f4846368 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);