From f6ccbaa7ab596b9b6fda9551ddcbb124640ae1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Thu, 31 Oct 2024 14:41:21 +0100 Subject: [PATCH] WinSock: Initialize with version 2.2 It hasn't seemingly made a difference in the time since then but we were using 2.0, apparently an internal draft version. Fixes: QTBUG-130590 Change-Id: I78e25eba76dc9a3150932981f6c703eb0b7f3874 Reviewed-by: Thiago Macieira --- src/corelib/global/qsysinfo.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/corelib/global/qsysinfo.cpp b/src/corelib/global/qsysinfo.cpp index bcaac5bafd5..a79a4d3bb84 100644 --- a/src/corelib/global/qsysinfo.cpp +++ b/src/corelib/global/qsysinfo.cpp @@ -135,14 +135,12 @@ public: QWindowsSockInit::QWindowsSockInit() : version(0) { - //### should we try for 2.2 on all platforms ?? WSAData wsadata; - // IPv6 requires Winsock v2.0 or better. - if (WSAStartup(MAKEWORD(2, 0), &wsadata) != 0) { - qWarning("QTcpSocketAPI: WinSock v2.0 initialization failed."); + if (WSAStartup(MAKEWORD(2, 2), &wsadata) != 0) { + qWarning("QTcpSocketAPI: WinSock v2.2 initialization failed."); } else { - version = 0x20; + version = 0x22; } }