Commit 2cd5b014 authored by Ian Lance Taylor's avatar Ian Lance Taylor

net: fix windows build

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7229050
parent 31f58dce
......@@ -41,3 +41,14 @@ func listenerSockaddr(s syscall.Handle, f int, la syscall.Sockaddr, toAddr func(
}
return la, nil
}
func sysSocket(f, t, p int) (syscall.Handle, error) {
// See ../syscall/exec_unix.go for description of ForkLock.
syscall.ForkLock.RLock()
s, err := syscall.Socket(f, t, p)
if err == nil {
syscall.CloseOnExec(s)
}
syscall.ForkLock.RUnlock()
return s, err
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment