Bump wasi-libc to SDK 20

The version 17 SDK adds `getpagesize`, so use it instead of hardcoding a
number (even if their implementation is _also_ a hardcoded number.)
This commit is contained in:
Elliott Sales de Andrade
2023-09-23 04:02:54 -04:00
committed by Ron Evans
parent 1a59aecb63
commit ce25f00769
6 changed files with 13 additions and 9 deletions
+6 -2
View File
@@ -398,8 +398,7 @@ func Chmod(path string, mode uint32) (err error) {
}
func Getpagesize() int {
// per upstream
return 65536
return libc_getpagesize()
}
type Utsname struct {
@@ -428,6 +427,11 @@ func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
// This is a stub, it is not functional.
func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
// int getpagesize(void);
//
//export getpagesize
func libc_getpagesize() int
// int stat(const char *path, struct stat * buf);
//
//export stat