From 7ee786388ae0d6f8c8cea7bf012cc11fdb5b534a Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sun, 16 Jan 2022 01:18:49 +0900 Subject: [wasm] wasm/missing.{c,h}: add missing libc stubs for wasi-libc --- missing/flock.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'missing') diff --git a/missing/flock.c b/missing/flock.c index c0b3f80601..9daf1c38cc 100644 --- a/missing/flock.c +++ b/missing/flock.c @@ -2,6 +2,13 @@ #include "ruby/ruby.h" #if defined _WIN32 +#elif defined __wasi__ +#include + +int flock(int fd, int operation) { + errno = EINVAL; + return -1; +} #elif defined HAVE_FCNTL && defined HAVE_FCNTL_H /* These are the flock() constants. Since this systems doesn't have -- cgit v1.2.3