From 6fd96b6ef316d3d30f48611ec20bb3742a68fce4 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Fri, 10 Mar 2023 17:31:06 -0600 Subject: [PATCH] bugfix: window compilation --- compiler/src/wasm_runtime.c | 1 - runtime/onyx_runtime.c | 3 +++ runtime/src/ort_files.h | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/src/wasm_runtime.c b/compiler/src/wasm_runtime.c index 0233a4f9..faac4a4c 100644 --- a/compiler/src/wasm_runtime.c +++ b/compiler/src/wasm_runtime.c @@ -3,7 +3,6 @@ #include "astnodes.h" #include "wasm.h" #include "onyx_library.h" -#include "dyncall.h" #ifdef USE_DYNCALL #include "dyncall.h" diff --git a/runtime/onyx_runtime.c b/runtime/onyx_runtime.c index ced55265..aa3af073 100644 --- a/runtime/onyx_runtime.c +++ b/runtime/onyx_runtime.c @@ -47,7 +47,10 @@ ONYX_LIBRARY { ONYX_FUNC(__file_size) ONYX_FUNC(__file_get_standard) ONYX_FUNC(__file_rename) + +#ifdef _BH_LINUX ONYX_FUNC(__enable_non_blocking_stdin) +#endif ONYX_FUNC(__dir_open) ONYX_FUNC(__dir_read) diff --git a/runtime/src/ort_files.h b/runtime/src/ort_files.h index 0fcb6402..b6f90491 100644 --- a/runtime/src/ort_files.h +++ b/runtime/src/ort_files.h @@ -210,6 +210,7 @@ ONYX_DEF(__file_rename, (WASM_I32, WASM_I32, WASM_I32, WASM_I32), (WASM_I32)) { #endif } +#ifdef _BH_LINUX ONYX_DEF(__enable_non_blocking_stdin, (), ()) { int flags = fcntl(STDIN_FILENO, F_GETFL, 0); flags |= O_NONBLOCK; @@ -217,4 +218,4 @@ ONYX_DEF(__enable_non_blocking_stdin, (), ()) { return NULL; } - +#endif -- 2.25.1