Commit 0f5830b9 authored by Russ Cox's avatar Russ Cox

net: fix windows build

R=adg
CC=golang-dev
https://golang.org/cl/2111045
parent dbc226d5
......@@ -54,7 +54,7 @@ func LookupSRV(name string) (cname string, addrs []*SRV, err os.Error) {
i := 0
for p := r; p != nil && p.Type == syscall.DNS_TYPE_SRV; p = p.Next {
v := (*syscall.DNSSRVData)(unsafe.Pointer(&p.Data[0]))
addrs[i] = &SRV{syscall.UTF16ToString((*[256]uint16)(unsafe.Pointer(v.Target))), v.Port, v.Priority, v.Weight}
addrs[i] = &SRV{syscall.UTF16ToString((*[256]uint16)(unsafe.Pointer(v.Target))[:]), v.Port, v.Priority, v.Weight}
i++
}
addrs = addrs[0:i]
......
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