mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 07:07:33 -04:00
plan9: reduce the set of architecture-dependent files on Plan 9
From main repo: https://go-review.googlesource.com/#/c/2167 Change-Id: I2043458a432ccd2aa8b206adc107ac7b215e355f Reviewed-on: https://go-review.googlesource.com/8720 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
@@ -136,12 +136,12 @@ func Fd2path(fd int) (path string, err error) {
|
||||
return cstring(buf[:]), nil
|
||||
}
|
||||
|
||||
//sys pipe(p *[2]_C_int) (err error)
|
||||
//sys pipe(p *[2]int32) (err error)
|
||||
func Pipe(p []int) (err error) {
|
||||
if len(p) != 2 {
|
||||
return syscall.ErrorString("bad arg in system call")
|
||||
}
|
||||
var pp [2]_C_int
|
||||
var pp [2]int32
|
||||
err = pipe(&pp)
|
||||
p[0] = int(pp[0])
|
||||
p[1] = int(pp[1])
|
||||
|
||||
Reference in New Issue
Block a user