Solaris will use the version in sock_unix.go.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201183
138bc75d-0d04-0410-961f-
82ee72b054a4
// The kernel does not track the limit.
return syscall.SOMAXCONN
}
-
-func listenerSockaddr(s, f int, la syscall.Sockaddr, toAddr func(syscall.Sockaddr) Addr) (syscall.Sockaddr, error) {
- a := toAddr(la)
- if a == nil {
- return la, nil
- }
- switch v := a.(type) {
- case *TCPAddr, *UnixAddr:
- err := setDefaultListenerSockopts(s)
- if err != nil {
- return nil, err
- }
- case *UDPAddr:
- if v.IP.IsMulticast() {
- err := setDefaultMulticastSockopts(s)
- if err != nil {
- return nil, err
- }
- switch f {
- case syscall.AF_INET:
- v.IP = IPv4zero
- case syscall.AF_INET6:
- v.IP = IPv6unspecified
- }
- return v.sockaddr(f)
- }
- }
- return la, nil
-}