From 10bed2d13e6d670f4ed0f18e564f1e6790f2d812 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Thu, 16 Jun 2022 22:43:56 +0200 Subject: Change MD5 function signatures, make libtvn static, not object this solves a problem on x86_64 Windows where the MD5 functions were included within ntdll. STATIC libraries have better defined behavior than static ones, and we do not compile the same thing multiple times since we use it as a libary. --- src/toast.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/toast.c') diff --git a/src/toast.c b/src/toast.c index 34d28b9..475847c 100644 --- a/src/toast.c +++ b/src/toast.c @@ -589,7 +589,7 @@ static int fileHash(char* path, char* hash) fseek(fd, 0L, SEEK_SET); MD5_CTX context; - MD5Init(&context); + MD5_Init(&context); if (fd_size) { @@ -602,13 +602,13 @@ static int fileHash(char* path, char* hash) fread(buf, sizeof(char), fd_size, fd); - MD5Update(&context, buf, fd_size); + MD5_Update(&context, buf, fd_size); free(buf); } fclose(fd); unsigned char digest[16]; - MD5Final(digest, &context); + MD5_Final(digest, &context); char md5string[33]; for(int i = 0; i < 16; ++i) -- cgit v1.2.3