]> git.feebdaed.xyz Git - 0xmirror/curl.git/commit
sws: fix binding to unix socket on Windows
authorViktor Szakats <commit@vsz.me>
Tue, 2 Dec 2025 16:45:18 +0000 (17:45 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 4 Dec 2025 21:49:03 +0000 (22:49 +0100)
commitf97e62ff147feff09e1a29a2db6b4a7f928d75a0
tree0ad4eeba587965f90321b71f08e7e3e6e08e6e66
parentdfd781ff627991c7b660fe6534c347b1a97bcc17
sws: fix binding to unix socket on Windows

Windows 10.17063+ (having unix socket support) fails to set for unix
sockets the `SO_REUSEADDR` option, with error 10045 (`WSAEOPNOTSUPP`),
and also fails to set `SO_KEEPALIVE` with error 10042 (`WSAENOPROTOOPT`).

Fix by not enabling these socket options on Windows for unix sockets.

Also:
- fixing test 1435, 1436 to run in CI.
- fixing the `socksd` test server for test 1467, 1468, 1470. But, also
  disable these for now due to another Windows issue: #19825

Ref: https://stackoverflow.com/questions/68791319/unix-domain-socket-bind-failed-in-windows/68794755#68794755
Ref: #19810
Closes #19812
tests/data/test1467
tests/data/test1468
tests/data/test1470
tests/server/sws.c
tests/server/util.c