Skip to content

Commit 2fc7618

Browse files
committed
fixed: compilation errors on Linux
1 parent 45b43ca commit 2fc7618

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

compiler/src/onyx.c

+2
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ static void onyx_watch(CompileOptions *compile_opts) {
842842
#endif
843843

844844
#if defined(_BH_LINUX) || defined(_BH_DARWIN)
845+
#include <sys/wait.h>
846+
845847
static void perform_self_upgrade(CompileOptions *opts, char *version) {
846848
// TODO: cleanup
847849

runtime/build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ echo "Compiling onyx_runtime.$suffix"
2020
$ONYX_CC -shared -fpic -w -O2 \
2121
-o onyx_runtime.$suffix \
2222
$FLAGS \
23+
-Wno-incompatible-pointer-types \
2324
-I ../shared/include -I ../compiler/include \
2425
./onyx_runtime.c \
2526
-lpthread

runtime/onyx_runtime.c

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <sys/socket.h>
2020
#include <sys/un.h>
2121
#include <sys/syscall.h>
22+
#include <sys/random.h>
2223
#include <poll.h>
2324
#include <termios.h>
2425
#include <sys/ioctl.h>

0 commit comments

Comments
 (0)