1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:17:56 -07:00

net: fix windows build

R=adg
CC=golang-dev
https://golang.org/cl/2111045
This commit is contained in:
Russ Cox 2010-09-10 15:50:29 -04:00
parent dbc226d5a1
commit 0f5830b9c3

View File

@ -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]