diff options
author | 2024-11-26 16:25:48 +0000 | |
---|---|---|
committer | 2024-11-26 16:25:48 +0000 | |
commit | 61f8f1e0e3236993f5522215f1900d35e49680c0 (patch) | |
tree | b8bec737013b8213996a40ab913a810833ac5e4e /vendor/github.com/tetratelabs/wazero/internal/platform/mprotect_syscall.go | |
parent | [bugfix] Allow unsetting filter expiration dates (#3560) (diff) | |
download | gotosocial-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/mprotect_syscall.go')
-rw-r--r-- | vendor/github.com/tetratelabs/wazero/internal/platform/mprotect_syscall.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/platform/mprotect_syscall.go b/vendor/github.com/tetratelabs/wazero/internal/platform/mprotect_syscall.go new file mode 100644 index 000000000..6fe96d6f6 --- /dev/null +++ b/vendor/github.com/tetratelabs/wazero/internal/platform/mprotect_syscall.go @@ -0,0 +1,10 @@ +//go:build (linux || darwin) && !tinygo + +package platform + +import "syscall" + +// MprotectRX is like syscall.Mprotect with RX permission. +func MprotectRX(b []byte) (err error) { + return syscall.Mprotect(b, syscall.PROT_READ|syscall.PROT_EXEC) +} |