diff --git a/src/libs/utils/hostosinfo.cpp b/src/libs/utils/hostosinfo.cpp
index 6e103a6dc88254a5a338c100d4dbec09cb291e23..0add69101fd9e4852f6f2862b91e4bebef9a8b5e 100644
--- a/src/libs/utils/hostosinfo.cpp
+++ b/src/libs/utils/hostosinfo.cpp
@@ -30,7 +30,9 @@
 #include "hostosinfo.h"
 
 #ifdef Q_OS_WIN
-#include <windows.h>
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501 /* WinXP, needed for GetNativeSystemInfo() */
+#include <qt_windows.h>
 #endif
 
 using namespace Utils;