Index: trunk/include/iprt/win/d3d8.h
===================================================================
--- trunk/include/iprt/win/d3d8.h	(revision 63549)
+++ trunk/include/iprt/win/d3d8.h	(revision 66823)
@@ -33,4 +33,7 @@
 # pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
 # pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 #endif
 
Index: trunk/include/iprt/win/d3d9.h
===================================================================
--- trunk/include/iprt/win/d3d9.h	(revision 63549)
+++ trunk/include/iprt/win/d3d9.h	(revision 66823)
@@ -33,4 +33,7 @@
 # pragma warning(disable:4668) /* warning C4668: 'WHEA_DOWNLEVEL_TYPE_NAMES' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
 # pragma warning(disable:4255) /* warning C4255: 'ObGetFilterVersion' : no function prototype given: converting '()' to '(void)' */
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 #endif
 
Index: trunk/include/iprt/win/intsafe.h
===================================================================
--- trunk/include/iprt/win/intsafe.h	(revision 63549)
+++ trunk/include/iprt/win/intsafe.h	(revision 66823)
@@ -49,4 +49,7 @@
 #  pragma warning(push)
 #  pragma warning(disable:4668) /* intsafe.h(55) : warning C4668: '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#  if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#   pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+#  endif
 # endif
 
Index: trunk/include/iprt/win/lazy-dbghelp.h
===================================================================
--- trunk/include/iprt/win/lazy-dbghelp.h	(revision 63549)
+++ trunk/include/iprt/win/lazy-dbghelp.h	(revision 66823)
@@ -30,4 +30,5 @@
 #include <iprt/path.h>
 #include <iprt/env.h>
+#include <iprt/err.h>
 
 
Index: trunk/include/iprt/win/objbase.h
===================================================================
--- trunk/include/iprt/win/objbase.h	(revision 63549)
+++ trunk/include/iprt/win/objbase.h	(revision 66823)
@@ -34,4 +34,7 @@
 #  pragma warning(disable:4255) /* 'FARPROC' : no function prototype given: converting '()' to '(void)' */
 # endif
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 #endif
 
Index: trunk/include/iprt/win/objidl.h
===================================================================
--- trunk/include/iprt/win/objidl.h	(revision 63549)
+++ trunk/include/iprt/win/objidl.h	(revision 66823)
@@ -30,4 +30,8 @@
 #pragma warning(push)
 #pragma warning(disable:4668) /* '__midl' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+# pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# pragma warning(disable:4255) /* windef.h(227) : warning C4255: 'NEARPROC' : no function prototype given: converting '()' to '(void)' */
+#endif
 
 #include <objidl.h>
Index: trunk/include/iprt/win/shlobj.h
===================================================================
--- trunk/include/iprt/win/shlobj.h	(revision 63549)
+++ trunk/include/iprt/win/shlobj.h	(revision 66823)
@@ -32,4 +32,8 @@
 # pragma warning(disable:4668) /* warning C4668: 'USE_SP_ALTPLATFORM_INFO_V1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
 #endif
+#if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+# pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# pragma warning(disable:4255) /* windef.h(227) : warning C4255: 'NEARPROC' : no function prototype given: converting '()' to '(void)' */
+#endif
 
 #include <shlobj.h>
Index: trunk/include/iprt/win/shlwapi.h
===================================================================
--- trunk/include/iprt/win/shlwapi.h	(revision 63549)
+++ trunk/include/iprt/win/shlwapi.h	(revision 66823)
@@ -31,4 +31,7 @@
 #pragma warning(disable:4668) /* warning C4668: 'USE_SP_ALTPLATFORM_INFO_V1' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
 #pragma warning(disable:4255) /* warning C4255: 'I_RpcMgmtEnableDedicatedThreadPool' : no function prototype given: converting '()' to '(void)' */
+#if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+# pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+#endif
 #include <shlwapi.h>
 
Index: trunk/include/iprt/win/windef.h
===================================================================
--- trunk/include/iprt/win/windef.h	(revision 63549)
+++ trunk/include/iprt/win/windef.h	(revision 66823)
@@ -39,4 +39,7 @@
 #  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
 # endif
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 #endif
 
Index: trunk/include/iprt/win/windows.h
===================================================================
--- trunk/include/iprt/win/windows.h	(revision 63549)
+++ trunk/include/iprt/win/windows.h	(revision 66823)
@@ -35,4 +35,7 @@
 # pragma warning(push)
 # pragma warning(disable:4668)
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 # ifndef __cplusplus
 #  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
Index: trunk/include/iprt/win/winsock.h
===================================================================
--- trunk/include/iprt/win/winsock.h	(revision 66823)
+++ trunk/include/iprt/win/winsock.h	(revision 66823)
@@ -0,0 +1,52 @@
+/** @file
+ * Safe way to include winsock2.h.
+ */
+
+/*
+ * Copyright (C) 2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+#ifndef ___iprt_win_winsock2_h___
+#define ___iprt_win_winsock2_h___
+
+#ifdef _MSC_VER
+/*
+ * Unfortunately, the Windows.h file in SDK 7.1 is not clean wrt warning C4668:
+ *      wincrypt.h(1848) : warning C4668: 'NTDDI_WINLH' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
+ */
+# pragma warning(push)
+# pragma warning(disable:4668)
+# ifndef __cplusplus
+#  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
+# endif
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
+#endif
+
+#include <winsock.h>
+
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
+#endif
+
Index: trunk/include/iprt/win/winsock2.h
===================================================================
--- trunk/include/iprt/win/winsock2.h	(revision 63549)
+++ trunk/include/iprt/win/winsock2.h	(revision 66823)
@@ -38,4 +38,7 @@
 #  pragma warning(disable:4255) /* warning C4255: 'FARPROC' : no function prototype given: converting '()' to '(void)' */
 # endif
+# if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+#  pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# endif
 #endif
 
Index: trunk/include/iprt/win/ws2tcpip.h
===================================================================
--- trunk/include/iprt/win/ws2tcpip.h	(revision 63549)
+++ trunk/include/iprt/win/ws2tcpip.h	(revision 66823)
@@ -30,4 +30,8 @@
 #pragma warning(push)
 #pragma warning(disable:4668) /* 'NDIS_SUPPORT_NDIS6' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
+#if _MSC_VER >= 1800 /*RT_MSC_VER_VC120*/
+# pragma warning(disable:4005) /* sdk/v7.1/include/sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition */
+# pragma warning(disable:4255) /* windef.h(227) : warning C4255: 'NEARPROC' : no function prototype given: converting '()' to '(void)' */
+#endif
 
 #include <ws2tcpip.h>
