diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-09-06 18:12:46 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-09-06 18:12:46 +0000 |
commit | aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13 (patch) | |
tree | 7e63b06d1eec92beec6997c9d3ab47a5d6a835be /libgo/go/internal/poll/sendfile_windows.go | |
parent | 920ea3b8ba3164b61ac9490dfdfceb6936eda6dd (diff) | |
download | gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.zip gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.tar.gz gcc-aa8901e9bb0399d2c16f988ba2fe46eb0c0c5d13.tar.bz2 |
libgo: update to Go 1.13beta1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497
From-SVN: r275473
Diffstat (limited to 'libgo/go/internal/poll/sendfile_windows.go')
-rw-r--r-- | libgo/go/internal/poll/sendfile_windows.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libgo/go/internal/poll/sendfile_windows.go b/libgo/go/internal/poll/sendfile_windows.go index 17a3681..0fe9b9b 100644 --- a/libgo/go/internal/poll/sendfile_windows.go +++ b/libgo/go/internal/poll/sendfile_windows.go @@ -8,12 +8,8 @@ import "syscall" // SendFile wraps the TransmitFile call. func SendFile(fd *FD, src syscall.Handle, n int64) (int64, error) { - ft, err := syscall.GetFileType(src) - if err != nil { - return 0, err - } - // TransmitFile does not work with pipes - if ft == syscall.FILE_TYPE_PIPE { + if fd.kind == kindPipe { + // TransmitFile does not work with pipes return 0, syscall.ESPIPE } |