os: Don't include <winsock2.h> on Cygwin

Fix compilation on Cygwin after 600d53e98f ("os: simplify win32
uname()").

Similarly to 30b7d7995e ("Fix build on Cygwin by ensuring WIN32 check
triggers only on MinGW"), check for both WIN32 and !CYGWIN before
including it.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2361>
(cherry picked from commit dc1a4e0348)
This commit is contained in:
Jon Turney 2026-10-15 16:01:59 +01:00 • committed by Enrico Weigelt, metux IT consult
commit 5a891eb762

View file

@ -127,7 +127,7 @@ extern Bool ComputeLocalClient(ClientPtr client);
void TimerInit(void);
Bool TimerForce(OsTimerPtr timer);
#ifdef WIN32
#if defined(WIN32) && !defined(__CYGWIN__)
#include <X11/Xwinsock.h>
struct utsname {
char nodename[512];