Skip to content

Commit

Permalink
CMake: Put "winsock2.h" before "windows.h" during configure checks
Browse files Browse the repository at this point in the history
"windows.h" includes "winsock.h" what causes many redefinition errors
if "winsock2.h" is included afterwards and can cause build to fail.
  • Loading branch information
jzakrzewski authored and bagder committed Sep 23, 2015
1 parent 0110cce commit 7c478ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/OtherTests.cmake
Expand Up @@ -10,8 +10,8 @@ endmacro(add_header_include)

set(signature_call_conv)
if(HAVE_WINDOWS_H)
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK_H "winsock.h")
set(_source_epilogue
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
Expand Down

0 comments on commit 7c478ca

Please sign in to comment.