summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/memory/mmap_openbsd.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-24 12:26:22 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-24 12:26:22 +0200
commit88979b35d462516e1765524d70a41c0d26eec911 (patch)
treefd37cb19317217e226ee7717824f24031f53b031 /vendor/modernc.org/memory/mmap_openbsd.go
parentRevert "[chore] Tidy up federating db locks a tiny bit (#472)" (#479) (diff)
downloadgotosocial-88979b35d462516e1765524d70a41c0d26eec911.tar.xz
[chore] Update bun and sqlite dependencies (#478)
* update bun + sqlite versions * step bun to v1.1.3
Diffstat (limited to 'vendor/modernc.org/memory/mmap_openbsd.go')
-rw-r--r--vendor/modernc.org/memory/mmap_openbsd.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/modernc.org/memory/mmap_openbsd.go b/vendor/modernc.org/memory/mmap_openbsd.go
new file mode 100644
index 000000000..117cfd9ff
--- /dev/null
+++ b/vendor/modernc.org/memory/mmap_openbsd.go
@@ -0,0 +1,19 @@
+// Copyright 2017 The Memory Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build 386 || amd64
+// +build 386 amd64
+
+package memory
+
+import (
+ _ "unsafe"
+)
+
+// Function syscall.mmap for darwin and openbsd calls internal/abi.FuncPCABI0,
+// which is implemented as a compile intrinsic so the code cannot be reused.
+// Using go:linkname directive to link mmapSyscall to syscall.mmap
+
+//go:linkname mmapSyscall syscall.mmap
+func mmapSyscall(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)