diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-08-09 16:14:37 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-08-10 00:39:27 +0200 |
commit | 2fca31ccc14c0655a21bdc9058096107cd38a42c (patch) | |
tree | 8adea7d4a40a9521c897bd22db79021724725061 /src/lib/ndpi_main.c | |
parent | 729ff21d0cbc74cc0b100d95998d59e082b3b2e4 (diff) |
Fixed Mingw64 build.improved/sonarcloud-ci
* adapted to SonarCloud-CI workflow
* removed broken and incomplete Windows example (tested on VS2017/VS2019)
* removed unnecessary include (e.g. pthread.h for the library which does not make use of it)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 464b2b326..6b7cd9a3f 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7063,30 +7063,6 @@ char *ndpi_revision() { /* ****************************************************** */ -#ifdef WIN32 - -/* https://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows */ -int gettimeofday(struct timeval *tp, struct timezone *tzp) { - // Note: some broken versions only have 8 trailing zero's, the correct epoch has 9 trailing zero's - // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC) - // until 00:00:00 January 1, 1970 - static const uint64_t EPOCH = ((uint64_t) 116444736000000000ULL); - - SYSTEMTIME system_time; - FILETIME file_time; - uint64_t time; - - GetSystemTime(&system_time); - SystemTimeToFileTime(&system_time, &file_time); - time = ((uint64_t) file_time.dwLowDateTime); - time += ((uint64_t) file_time.dwHighDateTime) << 32; - - tp->tv_sec = (long) ((time - EPOCH) / 10000000L); - tp->tv_usec = (long) (system_time.wMilliseconds * 1000); - return(0); -} -#endif - int NDPI_BITMASK_COMPARE(NDPI_PROTOCOL_BITMASK a, NDPI_PROTOCOL_BITMASK b) { int i; |