]> Cypherpunks repositories - gostls13.git/commit
internal/syscall/windows: implement SupportUnixSocket by enumerating protocols
authorqmuntal <quimmuntal@gmail.com>
Fri, 8 Mar 2024 10:19:14 +0000 (11:19 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 12 Mar 2024 17:24:57 +0000 (17:24 +0000)
commit34d28ba932cc26af9ae6c0233f4967a9b7cd94c2
treed1fd70f1cc3806f5e693f2850a4cd9bef472d2db
parent293fadffe7907dd4fc87201b8d9b7a186946639e
internal/syscall/windows: implement SupportUnixSocket by enumerating protocols

windows.SupportUnixSocket is currently implemented using a Windows
version check. This approach is not reliable, see #27943 and #28061.
Also, it uses the undocumented RtlGetNtVersionNumbers API, which
we should try to avoid.

This PR implements SupportUnixSocket by enumerating the available
protocols and checking for AF_UNIX support.

Cq-Include-Trybots: luci.golang.try:gotip-windows-arm64
Change-Id: I76cd635067309f09571ad0eac4a5699450a2709a
Reviewed-on: https://go-review.googlesource.com/c/go/+/570075
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/version_windows.go
src/internal/syscall/windows/version_windows_test.go [new file with mode: 0644]
src/net/unixsock_windows_test.go