mirror of
https://github.com/golang/go
synced 2024-11-24 21:10:04 -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:
parent
f6f83e4938
commit
238af7700e
@ -86,7 +86,7 @@ func TestListenMulticastUDP(t *testing.T) {
|
||||
|
||||
func TestSimpleListenMulticastUDP(t *testing.T) {
|
||||
switch runtime.GOOS {
|
||||
case "plan9":
|
||||
case "plan9", "windows":
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,7 @@ func setDefaultSockopts(s syscall.Handle, f, t int) error {
|
||||
// to be handled by the correct socket.
|
||||
|
||||
// Allow broadcast.
|
||||
err := syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1)
|
||||
if err != nil {
|
||||
return os.NewSyscallError("setsockopt", err)
|
||||
}
|
||||
|
||||
syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user