libgo: Solaris compatibility patches.
From Rainer Orth. From-SVN: r182296
This commit is contained in:
parent
7b1c3dd9e6
commit
9dadf3bf5e
@ -85,7 +85,8 @@ func (p *pollster) WaitFD(s *pollServer, nsec int64) (fd int, mode int, err erro
|
|||||||
timeout = &tv
|
timeout = &tv
|
||||||
}
|
}
|
||||||
|
|
||||||
var n, e int
|
var n int
|
||||||
|
var e error
|
||||||
var tmpReadFds, tmpWriteFds syscall.FdSet
|
var tmpReadFds, tmpWriteFds syscall.FdSet
|
||||||
for {
|
for {
|
||||||
// Temporary syscall.FdSet's into which the values are copied
|
// 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
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if e != 0 {
|
if e != nil {
|
||||||
return -1, 0, os.NewSyscallError("select", e)
|
return -1, 0, os.NewSyscallError("select", e)
|
||||||
}
|
}
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
|
@ -10,7 +10,7 @@ import "syscall"
|
|||||||
|
|
||||||
func Hostname() (name string, err error) {
|
func Hostname() (name string, err error) {
|
||||||
var u syscall.Utsname
|
var u syscall.Utsname
|
||||||
if errno := syscall.Uname(&u); errno != 0 {
|
if errno := syscall.Uname(&u); errno != nil {
|
||||||
return "", NewSyscallError("uname", errno)
|
return "", NewSyscallError("uname", errno)
|
||||||
}
|
}
|
||||||
b := make([]byte, len(u.Nodename))
|
b := make([]byte, len(u.Nodename))
|
||||||
|
Loading…
Reference in New Issue
Block a user