net: use libSystem bindings for DNS resolution on macos if cgo is unavailable
This change adds directives to link the res_search function in libSystem. The corresponding Go function is then used in `lookup_darwin.go` for resolution when cgo is disabled. This makes DNS resolution logic more reliable as macOS has some unique quirks such as the `/etc/resolver/` directory for specifying nameservers. Fixes #12524 Change-Id: I367263c4951383965b3ef6491196152f78e614b1 GitHub-Last-Rev: 3c3ff6bfa7e4811f206f3b119a867c841a016e10 GitHub-Pull-Request: golang/go#30686 Reviewed-on: https://go-review.googlesource.com/c/go/+/166297 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Showing
src/net/cgo_darwin_stub.go
0 → 100644
src/runtime/lookup_darwin.go
0 → 100644
Please register or sign in to comment