diff --git a/src/pkg/syscall/syscall_bsd.go b/src/pkg/syscall/syscall_bsd.go
index 2df75917b4b11aa939c4c55fe856246f96d17bfe..7fd85a3203d670d88b58472dc17e30cac966f3e9 100644
--- a/src/pkg/syscall/syscall_bsd.go
+++ b/src/pkg/syscall/syscall_bsd.go
@@ -135,16 +135,6 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
 	return
 }
 
-//sysnb	pipe() (r int, w int, errno int)
-
-func Pipe(p []int) (errno int) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	p[0], p[1], errno = pipe()
-	return
-}
-
 func Sleep(ns int64) (errno int) {
 	tv := NsecToTimeval(ns)
 	return Select(0, nil, nil, nil, &tv)
diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go
index d43d486d5aeac75c1d16712450dcf165d796d84f..11dc8aae2222008292a22fc2f370a01fe04d5fa6 100644
--- a/src/pkg/syscall/syscall_darwin.go
+++ b/src/pkg/syscall/syscall_darwin.go
@@ -60,6 +60,16 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
 func PtraceAttach(pid int) (errno int) { return ptrace(PT_ATTACH, pid, 0, 0) }
 func PtraceDetach(pid int) (errno int) { return ptrace(PT_DETACH, pid, 0, 0) }
 
+//sysnb pipe() (r int, w int, errno int)
+
+func Pipe(p []int) (errno int) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	p[0], p[1], errno = pipe()
+	return
+}
+
 // TODO
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) {
 	return -1, ENOSYS
diff --git a/src/pkg/syscall/syscall_freebsd.go b/src/pkg/syscall/syscall_freebsd.go
index ac2f505d10af7f956d54d4377572b60dc401fdee..c2bddd99d540629060c61db863ccc35a2b74f2ac 100644
--- a/src/pkg/syscall/syscall_freebsd.go
+++ b/src/pkg/syscall/syscall_freebsd.go
@@ -56,6 +56,16 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int,
 	return origlen - len(buf), count, names
 }
 
+//sysnb pipe() (r int, w int, errno int)
+
+func Pipe(p []int) (errno int) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	p[0], p[1], errno = pipe()
+	return
+}
+
 // TODO
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) {
 	return -1, ENOSYS