diff --git a/cmake/modules/UseWinLibs.cmake b/cmake/modules/UseWinLibs.cmake index c5d986e072..22bf47aab3 100644 --- a/cmake/modules/UseWinLibs.cmake +++ b/cmake/modules/UseWinLibs.cmake @@ -10,6 +10,8 @@ if( WIN32 ) # We might need something like "if (CMAKE_COMPILER_ID MATCHES "MSVC")" # here to support other compilers on Windows. + set( WIN_WSOCK32_LIBRARY wsock32.lib ) + set( WIN_SETARGV_OBJECT setargv.obj ) set( WS_LINK_FLAGS ${WS_LINK_FLAGS} "${WIN_SETARGV_OBJECT}" ) diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index d798ac8c73..00ce91a9b8 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -24,17 +24,17 @@ IF(WIN32) set(WSUTIL_PLATFORM_FILES file_util.c + inet_aton.c + inet_ntop.c + inet_pton.c + strncasecmp.c + strptime.c unicode-utils.c + wsgetopt.c ) ENDIF(WIN32) set(WSUTIL_FILES -# @GETOPT_LO@ # wsgetopt.c -# @INET_ATON_LO@ # inet_aton.c -# @INET_NTOP_LO@ # inet_ntop.c -# @INET_PTON_LO@ # inet_pton.c -# @STRNCASECMP_LO@ # strncasecmp.c -# @STRPTIME_LO@ # strptime.c aes.c airpdcap_wep.c crash_info.c @@ -71,6 +71,7 @@ set(wsutil_LIBS ${GMODULE2_LIBRARIES} ${GLIB2_LIBRARIES} ${GCRYPT_LIBRARIES} + ${WIN_WSOCK32_LIBRARY} ) set(CLEAN_FILES diff --git a/wsutil/strncasecmp.c b/wsutil/strncasecmp.c index 88adc48ac5..56f3b15496 100644 --- a/wsutil/strncasecmp.c +++ b/wsutil/strncasecmp.c @@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include #include