Skip to content

Commit 76f299a

Browse files
committed
squash! fixups for arm64 windows
1 parent 193e2b1 commit 76f299a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

quickjs-libc.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@
2929
#include <inttypes.h>
3030
#include <string.h>
3131
#include <assert.h>
32-
#if !defined(_MSC_VER)
33-
#include <unistd.h>
34-
#endif
3532
#include <errno.h>
3633
#include <fcntl.h>
3734
#if !defined(_MSC_VER)
3835
#include <sys/time.h>
36+
#include <unistd.h>
3937
#endif
4038
#include <time.h>
4139
#include <signal.h>
@@ -90,6 +88,14 @@ extern char **environ;
9088
#define USE_WORKER // enable os.Worker
9189
#endif
9290

91+
#ifndef S_IFBLK
92+
#define S_IFBLK 0
93+
#endif
94+
95+
#ifndef S_IFIFO
96+
#define S_IFIFO 0
97+
#endif
98+
9399
#ifndef MAX_SAFE_INTEGER // already defined in amalgamation builds
94100
#define MAX_SAFE_INTEGER (((int64_t) 1 << 53) - 1)
95101
#endif
@@ -3075,7 +3081,7 @@ static JSValue js_os_sleep(JSContext *ctx, JSValueConst this_val,
30753081
#if defined(_WIN32)
30763082
static char *realpath(const char *path, char *buf)
30773083
{
3078-
if (!_fullpath(buf, path, PATH_MAX)) {
3084+
if (!_fullpath(buf, path, JS__PATH_MAX)) {
30793085
errno = ENOENT;
30803086
return NULL;
30813087
} else {

0 commit comments

Comments
 (0)