Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/os/getpagesize.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package os

import "syscall"

// Getpagesize returns the underlying system's memory page size.
func Getpagesize() int { return syscall.Getpagesize() }
5 changes: 0 additions & 5 deletions src/os/types_anyos.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@

package os

import "syscall"

// Getpagesize returns the underlying system's memory page size.
func Getpagesize() int { return syscall.Getpagesize() }

func (fs *fileStat) Name() string { return fs.name }
func (fs *fileStat) IsDir() bool { return fs.Mode().IsDir() }

Expand Down
39 changes: 39 additions & 0 deletions src/syscall/statfs_stubs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//go:build baremetal || js || wasip1 || wasip2 || wasm_unknown || nintendoswitch

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package syscall

// Statfs_t and Fsid have been copied from the Go source tree
// (syscall/ztypes_linux_amd64.go).

type Statfs_t struct {
Type int64
Bsize int64
Blocks uint64
Bfree uint64
Bavail uint64
Files uint64
Ffree uint64
Fsid Fsid
Namelen int64
Frsize int64
Flags int64
Spare [4]int64
}

type Fsid struct {
X__val [2]int32
}

// This is a stub, it is not functional.
func Statfs(path string, buf *Statfs_t) (err error) {
return ENOSYS
}

// This is a stub, it is not functional.
func Fstatfs(fd int, buf *Statfs_t) (err error) {
return ENOSYS
}