]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgo: Solaris compatibility patches.
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Dec 2011 19:18:34 +0000 (19:18 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 13 Dec 2011 19:18:34 +0000 (19:18 +0000)
From Rainer Orth.

From-SVN: r182296

libgo/go/net/fd_select.go
libgo/go/os/sys_uname.go

index b9544e96c754d8efc0f2e1bc25c0a4bf98bf6381..39c8f2777b2860048e1e533fb98e9813c4701984 100644 (file)
@@ -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 {
index 0e68647acdcb69564c9c83147a600215766b37e3..313ee62aef601c7dbc2004372c24fa56c8785b12 100644 (file)
@@ -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))