diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index 02ea7abf88..059617b367 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -37,6 +37,9 @@ ** ****************************************************************************/ +// see comment in ../platformdefs_win.h. +#define WIN32_LEAN_AND_MEAN 1 + #include "qgenericengine.h" #include "../qnetworksession_impl.h" diff --git a/src/plugins/bearer/platformdefs_win.h b/src/plugins/bearer/platformdefs_win.h index 8fb2f1bcc5..5a8487d868 100644 --- a/src/plugins/bearer/platformdefs_win.h +++ b/src/plugins/bearer/platformdefs_win.h @@ -40,6 +40,8 @@ #ifndef QPLATFORMDEFS_WIN_H #define QPLATFORMDEFS_WIN_H +// Since we need to include winsock2.h, we need to define WIN32_LEAN_AND_MEAN +// somewhere above so windows.h won't include winsock.h. #include #include #undef interface diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp index 5ce51670f7..7756709e55 100644 --- a/src/plugins/bearer/qnetworksession_impl.cpp +++ b/src/plugins/bearer/qnetworksession_impl.cpp @@ -37,6 +37,9 @@ ** ****************************************************************************/ +// see comment in ../platformdefs_win.h. +#define WIN32_LEAN_AND_MEAN 1 + #include "qnetworksession_impl.h" #include "qbearerengine_impl.h"