Andrea Gottardo 05787423d2 hostinfo: use Foundation APIs to get hostname on macOS
Updates tailscale/corp#22332

This PR changes the way we determine the current hostname on Darwin && !iOS builds. We now use the native NSHost.currentHost API to get the hostname, instead of the os.Hostname() call which in Go uses `sysctl kern.hostname`. In Sequoia, this appears to always return `Mac.home`, (`home` comes from my LAN).

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2024-08-14 13:58:58 -07:00
..