Hack together a clean build on Windows with MSVC

This commit is contained in:
Charles Dang 2018-02-22 13:11:15 +11:00
parent 691f9256ce
commit 86a918e670

View file

@ -15,7 +15,11 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifndef _WIN32
#include <unistd.h>
#else
#include <io.h>
#endif
#include <errno.h>
#include "bcrypt.h"
@ -39,7 +43,11 @@ static int try_close(int fd)
static int try_read(int fd, char *out, size_t count)
{
size_t total;
#ifndef _WIN32
ssize_t partial;
#else
int partial;
#endif
total = 0;
while (total < count)