diff options
Diffstat (limited to 'tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp')
-rw-r--r-- | tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index dd9202c748..c4d42206fe 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -50,6 +50,9 @@ #include <qdatastream.h> #ifdef Q_OS_WIN # include <qt_windows.h> +# if defined(Q_OS_WINRT) +# include <winsock2.h> +# endif #endif class tst_QHostAddress : public QObject @@ -336,12 +339,15 @@ void tst_QHostAddress::assignment() address = "::1"; QCOMPARE(address, QHostAddress("::1")); + // WinRT does not support sockaddr_in +#ifndef Q_OS_WINRT QHostAddress addr("4.2.2.1"); sockaddr_in sockAddr; sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = htonl(addr.toIPv4Address()); address.setAddress((sockaddr *)&sockAddr); QCOMPARE(address, addr); +#endif // !Q_OS_WINRT } void tst_QHostAddress::scopeId() |