summaryrefslogtreecommitdiff
path: root/syscall_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'syscall_linux.go')
-rw-r--r--syscall_linux.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/syscall_linux.go b/syscall_linux.go
new file mode 100644
index 0000000..3403544
--- /dev/null
+++ b/syscall_linux.go
@@ -0,0 +1,30 @@
+// +build linux,!386
+
+/* Copyright 2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ */
+
+package main
+
+import (
+ "golang.org/x/sys/unix"
+ "syscall"
+ "unsafe"
+)
+
+func sendmsg(fd int, msghdr *unix.Msghdr, flags int) (uintptr, uintptr, syscall.Errno) {
+ return unix.Syscall(
+ unix.SYS_SENDMSG,
+ uintptr(fd),
+ uintptr(unsafe.Pointer(msghdr)),
+ uintptr(flags),
+ )
+}
+
+func recvmsg(fd int, msghdr *unix.Msghdr, flags int) (uintptr, uintptr, syscall.Errno) {
+ return unix.Syscall(
+ unix.SYS_RECVMSG,
+ uintptr(fd),
+ uintptr(unsafe.Pointer(msghdr)),
+ uintptr(flags),
+ )
+}