summaryrefslogtreecommitdiff
path: root/src/syscall/zsyscall_freebsd_386.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2017-03-21 10:23:08 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2017-03-21 20:01:23 +0000
commit0ebaca6ba27534add5930a95acffa9acff182e2b (patch)
treef77906c731c0947f4c483cd8db2698980d6ccbf6 /src/syscall/zsyscall_freebsd_386.go
parent051cbf3f3720086ec6d3fd159a234bae3ffd12ef (diff)
downloadgo-git-0ebaca6ba27534add5930a95acffa9acff182e2b.tar.gz
syscall, os: use pipe2 syscall on FreeBSD instead of pipe
The pipe2 syscall exists in all officially supported FreeBSD versions: 10, 11 and future 12. The pipe syscall no longer exists in 11 and 12. To build and run Go on these versions, kernel needs COMPAT_FREEBSD10 option. Based on Gleb Smirnoff's https://golang.org/cl/38422 Fixes #18854 Change-Id: I8e201ee1b15dca10427c3093b966025d160aaf61 Reviewed-on: https://go-review.googlesource.com/38426 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/zsyscall_freebsd_386.go')
-rw-r--r--src/syscall/zsyscall_freebsd_386.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/syscall/zsyscall_freebsd_386.go b/src/syscall/zsyscall_freebsd_386.go
index 5c22deb181..8f3da43b64 100644
--- a/src/syscall/zsyscall_freebsd_386.go
+++ b/src/syscall/zsyscall_freebsd_386.go
@@ -261,10 +261,8 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}