]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix socketpair in syscall_bsd
authorRuss Cox <rsc@golang.org>
Fri, 24 Sep 2010 18:59:34 +0000 (14:59 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 24 Sep 2010 18:59:34 +0000 (14:59 -0400)
THIS WILL BREAK THE BUILD.

The z files have socketpair code in them that was
written by hand; breaking the build with this is the first
step in getting rid of that hand-written code.

R=adg
TBR=adg
CC=golang-dev
https://golang.org/cl/2197050

src/pkg/syscall/syscall_bsd.go

index 114a9636754d4bc54adbe5006ed15403d37a7027..767537093e5f0ee04109f357ce063cbbcec807f8 100644 (file)
@@ -323,8 +323,10 @@ func Socket(domain, typ, proto int) (fd, errno int) {
        return
 }
 
+//sys socketpair(domain int, typ int, proto int, fd *[2]int) (errno int)
+
 func Socketpair(domain, typ, proto int) (fd [2]int, errno int) {
-       fd, errno = socketpair(domain, typ, proto)
+       errno = socketpair(domain, typ, proto, &fd)
        return
 }