diff options
author | Yuta Saito <[email protected]> | 2022-01-16 01:18:49 +0900 |
---|---|---|
committer | Yuta Saito <[email protected]> | 2022-01-19 11:19:06 +0900 |
commit | 7ee786388ae0d6f8c8cea7bf012cc11fdb5b534a (patch) | |
tree | 5730c7c4890c284f3c8c9a19fab846a02acd6aa4 /missing/flock.c | |
parent | 65f95f26ff0e7b4be4704fedc52344a26d22a4e2 (diff) |
[wasm] wasm/missing.{c,h}: add missing libc stubs for wasi-libc
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5407
Diffstat (limited to 'missing/flock.c')
-rw-r--r-- | missing/flock.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <errno.h> + +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 |