Skip to content

Commit

Permalink
Towards portability.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Apr 2, 2024
1 parent 3451449 commit 613f0c2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vfs/shm.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build (linux || darwin) && (amd64 || arm64) && !sqlite3_nosys

package vfs

import (
Expand Down
21 changes: 21 additions & 0 deletions vfs/shm_other.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//go:build !(linux || darwin) || !(amd64 || arm64) || sqlite3_nosys

package vfs

import (
"context"

"github.com/tetratelabs/wazero/api"
)

type vfsShm struct{}

func (f *vfsFile) ShmMap(ctx context.Context, mod api.Module, id, size uint32, extend bool) (uint32, error) {
return 0, _IOERR_SHMMAP
}

func (f *vfsFile) ShmLock(offset, n uint32, flags _ShmFlag) error {
return _IOERR_SHMLOCK
}

func (f *vfsFile) ShmUnmap(delete bool) {}

0 comments on commit 613f0c2

Please sign in to comment.