diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bca10b..38ac947 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,7 +117,7 @@ endif() if(WIN32) target_link_libraries(rtl_sdr libgetopt_static) -target_link_libraries(rtl_tcp libgetopt_static) +target_link_libraries(rtl_tcp ws2_32 libgetopt_static) target_link_libraries(rtl_test libgetopt_static) target_link_libraries(rtl_fm libgetopt_static) target_link_libraries(rtl_eeprom libgetopt_static) diff --git a/src/rtl_adsb.c b/src/rtl_adsb.c index 4a65995..097a6f4 100644 --- a/src/rtl_adsb.c +++ b/src/rtl_adsb.c @@ -31,7 +31,7 @@ #ifndef _WIN32 #include #else -#include +#include #include #include #include "getopt/getopt.h" diff --git a/src/rtl_eeprom.c b/src/rtl_eeprom.c index 35191de..2b6d0b1 100644 --- a/src/rtl_eeprom.c +++ b/src/rtl_eeprom.c @@ -24,7 +24,7 @@ #ifndef _WIN32 #include #else -#include +#include #include "getopt/getopt.h" #endif diff --git a/src/rtl_fm.c b/src/rtl_fm.c index d9c1290..8851f87 100644 --- a/src/rtl_fm.c +++ b/src/rtl_fm.c @@ -52,7 +52,7 @@ #ifndef _WIN32 #include #else -#include +#include #include #include #include "getopt/getopt.h" diff --git a/src/rtl_power.c b/src/rtl_power.c index f4d132c..e2cb30d 100644 --- a/src/rtl_power.c +++ b/src/rtl_power.c @@ -49,7 +49,7 @@ #ifndef _WIN32 #include #else -#include +#include #include #include #include "getopt/getopt.h" diff --git a/src/rtl_sdr.c b/src/rtl_sdr.c index eeb6dba..730aa9e 100644 --- a/src/rtl_sdr.c +++ b/src/rtl_sdr.c @@ -25,7 +25,7 @@ #ifndef _WIN32 #include #else -#include +#include #include #include #include "getopt/getopt.h" diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c index 5e44935..8b6431e 100644 --- a/src/rtl_tcp.c +++ b/src/rtl_tcp.c @@ -33,7 +33,7 @@ #include #include #else -#include +#include #include "getopt/getopt.h" #endif @@ -109,7 +109,11 @@ int gettimeofday(struct timeval *tv, void* ignored) tmp <<= 32; tmp |= ft.dwLowDateTime; tmp /= 10; +#ifdef _MSC_VER tmp -= 11644473600000000Ui64; +#else + tmp -= 11644473600000000ULL; +#endif tv->tv_sec = (long)(tmp / 1000000UL); tv->tv_usec = (long)(tmp % 1000000UL); } diff --git a/src/rtl_test.c b/src/rtl_test.c index f5a56b8..4320cf9 100644 --- a/src/rtl_test.c +++ b/src/rtl_test.c @@ -32,7 +32,7 @@ #ifndef _WIN32 #include #else -#include +#include #include "getopt/getopt.h" #endif