1
0
mirror of https://github.com/golang/go synced 2024-11-12 07:40:23 -07:00

net: fix windows build

Ignore result of setting SO_BROADCAST.

Disable TestSimpleListenMulticastUDP as
setIPv4MulticastInterface is not implemented.

R=golang-dev, bradfitz, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5610044
This commit is contained in:
Alex Brainman 2012-02-01 12:13:46 +11:00
parent f6f83e4938
commit 238af7700e
2 changed files with 2 additions and 6 deletions

View File

@ -86,7 +86,7 @@ func TestListenMulticastUDP(t *testing.T) {
func TestSimpleListenMulticastUDP(t *testing.T) { func TestSimpleListenMulticastUDP(t *testing.T) {
switch runtime.GOOS { switch runtime.GOOS {
case "plan9": case "plan9", "windows":
return return
} }

View File

@ -27,11 +27,7 @@ func setDefaultSockopts(s syscall.Handle, f, t int) error {
// to be handled by the correct socket. // to be handled by the correct socket.
// Allow broadcast. // Allow broadcast.
err := syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1) syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1)
if err != nil {
return os.NewSyscallError("setsockopt", err)
}
return nil return nil
} }