mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
syscall: define MAP_SHARED and PROT_READ on wasi
Makes 1.18 tests a little happier. Not sure mmap works on wasi, so these may be somewhat stubby.
This commit is contained in:
@@ -59,6 +59,19 @@ const (
|
||||
O_SYNC = __WASI_FDFLAGS_SYNC
|
||||
|
||||
O_CLOEXEC = 0
|
||||
|
||||
// ../../lib/wasi-libc/sysroot/include/sys/mman.h
|
||||
MAP_FILE = 0
|
||||
MAP_SHARED = 0x01
|
||||
MAP_PRIVATE = 0x02
|
||||
MAP_ANON = 0x20
|
||||
MAP_ANONYMOUS = MAP_ANON
|
||||
|
||||
// ../../lib/wasi-libc/sysroot/include/sys/mman.h
|
||||
PROT_NONE = 0
|
||||
PROT_READ = 1
|
||||
PROT_WRITE = 2
|
||||
PROT_EXEC = 4
|
||||
)
|
||||
|
||||
//go:extern errno
|
||||
|
||||
Reference in New Issue
Block a user