fix windows build

This commit is contained in:
Andrew Kelley 2019-03-07 13:32:43 -05:00
parent 197311d7dd
commit 431b3b2459

View File

@ -35,6 +35,7 @@
#include <shlobj.h>
#include <io.h>
#include <fcntl.h>
#include <ntsecapi.h>
typedef SSIZE_T ssize_t;
#else
@ -1402,7 +1403,7 @@ Error os_make_dir(Buf *path) {
static void init_rand() {
#if defined(ZIG_OS_WINDOWS)
const char bytes[sizeof(unsigned)];
char bytes[sizeof(unsigned)];
unsigned seed;
RtlGenRandom(bytes, sizeof(unsigned));
memcpy(&seed, bytes, sizeof(unsigned));