From: Brendan Hansen Date: Fri, 10 Mar 2023 23:31:06 +0000 (-0600) Subject: bugfix: window compilation X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=6fd96b6ef316d3d30f48611ec20bb3742a68fce4;p=onyx.git bugfix: window compilation --- 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