2 Dummy function stubs to get sqlite3.c compiling with
3 wasi-sdk. This requires, in addition:
5 -D_WASI_EMULATED_MMAN -D_WASI_EMULATED_GETPID
9 typedef unsigned mode_t
;
10 int fchmod(int fd
, mode_t mode
);
11 int fchmod(int fd
, mode_t mode
){
12 return (fd
&& mode
) ? 0 : 0;
14 typedef unsigned uid_t
;
16 int fchown(int fd
, uid_t owner
, gid_t group
);
17 int fchown(int fd
, uid_t owner
, gid_t group
){
18 return (fd
&& owner
&& group
) ? 0 : 0;
21 uid_t
geteuid(void){return 0;}
35 #define WASM__KEEP __attribute__((used))
39 wasi-sdk cannot build sqlite3's default VFS without at least the following
40 functions. They are apparently syscalls which clients have to implement or
43 https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md
62 path_filestat_set_times