mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-10 04:37:37 +01:00
tools: play nice with mingw/cygwin
This commit is contained in:
parent
7614a4d684
commit
dbede4e3c0
@ -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)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include "getopt/getopt.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include "getopt/getopt.h"
|
||||
#endif
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include "getopt/getopt.h"
|
||||
|
@ -49,7 +49,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include "getopt/getopt.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include "getopt/getopt.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#include <WinSock2.h>
|
||||
#include <winsock2.h>
|
||||
#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);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include "getopt/getopt.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user