summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/internal/socket/sys_linux.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-06-11 11:09:31 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-11 11:09:31 +0200
commitcf5c6d724d381a867a7ff5d82fb9432e26c395e8 (patch)
tree859bb6fa4a3de2fdcb218b24bb33ab7219e80ce7 /vendor/golang.org/x/net/internal/socket/sys_linux.go
parent[chore] Webfinger rework (#627) (diff)
downloadgotosocial-cf5c6d724d381a867a7ff5d82fb9432e26c395e8.tar.xz
[chore] Validate/set account domain (#619)
* add miekg/dns dependency * set/validate accountDomain
Diffstat (limited to 'vendor/golang.org/x/net/internal/socket/sys_linux.go')
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/golang.org/x/net/internal/socket/sys_linux.go
new file mode 100644
index 000000000..76f5b8ae5
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux.go
@@ -0,0 +1,23 @@
+// Copyright 2017 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.
+
+//go:build linux && !s390x && !386
+// +build linux,!s390x,!386
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}