diff --git a/src/pkg/os/file_posix.go b/src/pkg/os/file_posix.go
index ea42cc67b5128ef2b431dd6322bb453e6dfb1164..1ba32931541efa8a01b919f4ae77700babe7d17d 100644
--- a/src/pkg/os/file_posix.go
+++ b/src/pkg/os/file_posix.go
@@ -7,23 +7,12 @@
 package os
 
 import (
-	"sync/atomic"
 	"syscall"
 	"time"
 )
 
 func sigpipe() // implemented in package runtime
 
-func epipecheck(file *File, e error) {
-	if e == syscall.EPIPE {
-		if atomic.AddInt32(&file.nepipe, 1) >= 10 {
-			sigpipe()
-		}
-	} else {
-		atomic.StoreInt32(&file.nepipe, 0)
-	}
-}
-
 // Link creates newname as a hard link to the oldname file.
 // If there is an error, it will be of type *LinkError.
 func Link(oldname, newname string) error {
diff --git a/src/pkg/os/file_unix.go b/src/pkg/os/file_unix.go
index 12daa70a760c75df5953fc3c8e2a6b52298645de..5a220f66a7653a2341c373ae9c4d54f2ad59946e 100644
--- a/src/pkg/os/file_unix.go
+++ b/src/pkg/os/file_unix.go
@@ -8,6 +8,7 @@ package os
 
 import (
 	"runtime"
+	"sync/atomic"
 	"syscall"
 )
 
@@ -53,6 +54,16 @@ type dirInfo struct {
 	bufp int    // location of next record in buf.
 }
 
+func epipecheck(file *File, e error) {
+	if e == syscall.EPIPE {
+		if atomic.AddInt32(&file.nepipe, 1) >= 10 {
+			sigpipe()
+		}
+	} else {
+		atomic.StoreInt32(&file.nepipe, 0)
+	}
+}
+
 // DevNull is the name of the operating system's ``null device.''
 // On Unix-like systems, it is "/dev/null"; on Windows, "NUL".
 const DevNull = "/dev/null"
diff --git a/src/pkg/os/file_windows.go b/src/pkg/os/file_windows.go
index 320ee22518c5ec225a5f6c6edffbd94ed5d0608f..6c2bc6639c6235d1135b84d2272c55e9f6b1ab30 100644
--- a/src/pkg/os/file_windows.go
+++ b/src/pkg/os/file_windows.go
@@ -54,6 +54,9 @@ type dirInfo struct {
 	path     string
 }
 
+func epipecheck(file *File, e error) {
+}
+
 const DevNull = "NUL"
 
 func (f *file) isdir() bool { return f != nil && f.dirinfo != nil }