summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-11-26 16:25:48 +0000
committerLibravatar GitHub <noreply@github.com>2024-11-26 16:25:48 +0000
commit61f8f1e0e3236993f5522215f1900d35e49680c0 (patch)
treeb8bec737013b8213996a40ab913a810833ac5e4e /vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go
parent[bugfix] Allow unsetting filter expiration dates (#3560) (diff)
downloadgotosocial-61f8f1e0e3236993f5522215f1900d35e49680c0.tar.xz
pull in ncruces/go-sqlite3 v0.20.3 with tetratelabs/wazero v1.8.2 (#3574)
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go')
-rw-r--r--vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go b/vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go
index b0519003b..8d0baa712 100644
--- a/vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go
+++ b/vendor/github.com/tetratelabs/wazero/internal/platform/mmap_unix.go
@@ -1,10 +1,9 @@
-//go:build (darwin || linux || freebsd) && !tinygo
+//go:build (linux || darwin || freebsd || netbsd || dragonfly || solaris) && !tinygo
package platform
import (
"syscall"
- "unsafe"
)
const (
@@ -31,17 +30,3 @@ func mmapCodeSegmentARM64(size int) ([]byte, error) {
// The region must be RW: RW for writing native codes.
return mmapCodeSegment(size, mmapProtARM64)
}
-
-// MprotectRX is like syscall.Mprotect with RX permission, defined locally so that freebsd compiles.
-func MprotectRX(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- }
- const prot = syscall.PROT_READ | syscall.PROT_EXEC
- _, _, e1 := syscall.Syscall(syscall.SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = syscall.Errno(e1)
- }
- return
-}