Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.0.0
-
None
-
Qt 5 from git (9fe5139e), Windows XP Pro SP3, mingw-w64 (GCC 4.7.1).
-
1655cb5a690895631238b5b7a9a1f0c8ad32fbc4
Description
Commit dbcbd470 forcefully adds the WSA_FLAG_NO_HANDLE_INHERIT flag (QNativeSocketEnginePrivate::createNewSocket), even if it is not supported on the current system. In particular, on Windows XP (SP3) that leads to WSASocket always failing with WSAEPROTOTYPE (QTcpSocket::connectToHost fails immediately with "Protocol type not supported"). I fixed it just by changing
#ifndef WSA_FLAG_NO_HANDLE_INHERIT
#define WSA_FLAG_NO_HANDLE_INHERIT 0x80
#endif
to
#ifndef WSA_FLAG_NO_HANDLE_INHERIT
#define WSA_FLAG_NO_HANDLE_INHERIT 0
#endif
Attachments
For Gerrit Dashboard: QTBUG-26224 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
28943,1 | Fix non inheritable socket creation on old windows versions | master | qt/qtbase | Status: MERGED | +2 | 0 |