From 630e7a69b1bb0d07aa271686ec139a07c7d40efb Mon Sep 17 00:00:00 2001 From: dongresource Date: Wed, 13 Sep 2023 23:19:24 +0200 Subject: [PATCH] Make the bcrypt.c changes portable --- vendor/bcrypt/bcrypt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vendor/bcrypt/bcrypt.c b/vendor/bcrypt/bcrypt.c index 60448b7..7f86c0a 100644 --- a/vendor/bcrypt/bcrypt.c +++ b/vendor/bcrypt/bcrypt.c @@ -24,7 +24,6 @@ #ifdef _WIN32 || _WIN64 // On windows we need to generate random bytes differently. -//typedef __int64 ssize_t; #define BCRYPT_HASHSIZE 60 #include "bcrypt.h" @@ -51,10 +50,11 @@ static int try_close(int fd) return ret; } +#ifndef _WIN32 static int try_read(int fd, char *out, size_t count) { size_t total; - __int64 partial; + ssize_t partial; total = 0; while (total < count) @@ -75,6 +75,7 @@ static int try_read(int fd, char *out, size_t count) return 0; } +#endif /* * This is a best effort implementation. Nothing prevents a compiler from