Commit 9dadf3bf by Ian Lance Taylor

libgo: Solaris compatibility patches.

From Rainer Orth.

From-SVN: r182296
parent 7b1c3dd9
......@@ -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 {
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment