diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-13 19:18:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-12-13 19:18:34 +0000 |
commit | 9dadf3bf5ee8ef62f5e183e4595eba0b20d74902 (patch) | |
tree | 0e0c8a9f7b3ebc6701dc0862da3286d93f06a02f /libgo/go | |
parent | 7b1c3dd9e670da2041ff1af415999310f88888ad (diff) | |
download | gcc-9dadf3bf5ee8ef62f5e183e4595eba0b20d74902.zip gcc-9dadf3bf5ee8ef62f5e183e4595eba0b20d74902.tar.gz gcc-9dadf3bf5ee8ef62f5e183e4595eba0b20d74902.tar.bz2 |
libgo: Solaris compatibility patches.
From Rainer Orth.
From-SVN: r182296
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/net/fd_select.go | 5 | ||||
-rw-r--r-- | libgo/go/os/sys_uname.go | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/net/fd_select.go b/libgo/go/net/fd_select.go index b9544e9..39c8f27 100644 --- a/libgo/go/net/fd_select.go +++ b/libgo/go/net/fd_select.go @@ -85,7 +85,8 @@ func (p *pollster) WaitFD(s *pollServer, nsec int64) (fd int, mode int, err erro timeout = &tv } - var n, e int + var n int + var e error var tmpReadFds, tmpWriteFds syscall.FdSet for { // Temporary syscall.FdSet's into which the values are copied @@ -101,7 +102,7 @@ func (p *pollster) WaitFD(s *pollServer, nsec int64) (fd int, mode int, err erro break } } - if e != 0 { + if e != nil { return -1, 0, os.NewSyscallError("select", e) } if n == 0 { diff --git a/libgo/go/os/sys_uname.go b/libgo/go/os/sys_uname.go index 0e68647..313ee62 100644 --- a/libgo/go/os/sys_uname.go +++ b/libgo/go/os/sys_uname.go @@ -10,7 +10,7 @@ import "syscall" func Hostname() (name string, err error) { var u syscall.Utsname - if errno := syscall.Uname(&u); errno != 0 { + if errno := syscall.Uname(&u); errno != nil { return "", NewSyscallError("uname", errno) } b := make([]byte, len(u.Nodename)) |