mirror of https://github.com/golang/go.git
Revert "syscall, os: use pipe2 syscall on DragonflyBSD instead of pipe"
This reverts commit e6c15945de.
Reason for revert: breaks the Dragonfly builders.
Fixes #27245
Change-Id: I2c147a5726aec28647f6ef5eb8f9db5efa3a9fd0
Reviewed-on: https://go-review.googlesource.com/131497
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
969b9d8127
commit
a700ae9863
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build dragonfly freebsd netbsd openbsd
|
// +build freebsd netbsd openbsd
|
||||||
|
|
||||||
package os
|
package os
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build darwin js,wasm nacl solaris
|
// +build darwin dragonfly js,wasm nacl solaris
|
||||||
|
|
||||||
package os
|
package os
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build darwin solaris
|
// +build darwin dragonfly solaris
|
||||||
|
|
||||||
package syscall
|
package syscall
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build dragonfly freebsd netbsd openbsd
|
// +build freebsd netbsd openbsd
|
||||||
|
|
||||||
package syscall
|
package syscall
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,17 +72,13 @@ func direntNamlen(buf []byte) (uint64, bool) {
|
||||||
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
|
||||||
}
|
}
|
||||||
|
|
||||||
func Pipe(p []int) error {
|
//sysnb pipe() (r int, w int, err error)
|
||||||
return Pipe2(p, 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
//sysnb pipe2(flags int) (r int, w int, err error)
|
func Pipe(p []int) (err error) {
|
||||||
|
|
||||||
func Pipe2(p []int, flags int) (err error) {
|
|
||||||
if len(p) != 2 {
|
if len(p) != 2 {
|
||||||
return EINVAL
|
return EINVAL
|
||||||
}
|
}
|
||||||
p[0], p[1], err = pipe2(flags)
|
p[0], p[1], err = pipe()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -261,8 +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
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func pipe2(flags int) (r int, w int, err error) {
|
func pipe() (r int, w int, err error) {
|
||||||
r0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(flags), 0, 0)
|
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
|
||||||
r = int(r0)
|
r = int(r0)
|
||||||
w = int(r1)
|
w = int(r1)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,6 @@ const (
|
||||||
SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
|
SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); }
|
||||||
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
|
SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); }
|
||||||
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
|
SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); }
|
||||||
SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); }
|
|
||||||
SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
|
SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); }
|
||||||
SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); }
|
SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); }
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue