Fix re-definition issue of winsock.h and winsock2.h
This commit is contained in:
parent
1bf446c71e
commit
203bb5eb33
1 changed files with 1 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
|||
// A hack to include windows.h first, which ensures the GetMessage macro can
|
||||
// be undefined when we include <google/protobuf/stubs/common.h>
|
||||
#if defined(_WIN32)
|
||||
#define _WINSOCKAPI_ // to avoid re-definition in WinSock2.h
|
||||
#include <windows.h>
|
||||
#endif // _WIN32
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue