mirror of
https://github.com/golang/go
synced 2024-11-20 09:44:45 -07:00
net: fix windows build
R=golang-dev, r2 CC=golang-dev https://golang.org/cl/4184051
This commit is contained in:
parent
a5ff8ad9db
commit
6cf98a4553
@ -5,10 +5,14 @@
|
||||
package net
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMulticastJoinAndLeave(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
addr := &UDPAddr{
|
||||
IP: IPv4zero,
|
||||
Port: 0,
|
||||
|
@ -703,8 +703,19 @@ type Linger struct {
|
||||
Linger int32
|
||||
}
|
||||
|
||||
func SetsockoptLinger(fd, level, opt int, l *Linger) (errno int) { return EWINDOWS }
|
||||
func BindToDevice(fd int, device string) (errno int) { return EWINDOWS }
|
||||
const (
|
||||
IP_ADD_MEMBERSHIP = iota
|
||||
IP_DROP_MEMBERSHIP
|
||||
)
|
||||
|
||||
type IpMreq struct {
|
||||
Multiaddr [4]byte /* in_addr */
|
||||
Interface [4]byte /* in_addr */
|
||||
}
|
||||
|
||||
func SetsockoptLinger(fd, level, opt int, l *Linger) (errno int) { return EWINDOWS }
|
||||
func SetsockoptIpMreq(fd, level, opt int, mreq *IpMreq) (errno int) { return EWINDOWS }
|
||||
func BindToDevice(fd int, device string) (errno int) { return EWINDOWS }
|
||||
|
||||
// TODO(brainman): fix all needed for os
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user