aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_win32.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-08-09 16:14:37 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-08-10 00:39:27 +0200
commit2fca31ccc14c0655a21bdc9058096107cd38a42c (patch)
tree8adea7d4a40a9521c897bd22db79021724725061 /src/include/ndpi_win32.h
parent729ff21d0cbc74cc0b100d95998d59e082b3b2e4 (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/include/ndpi_win32.h')
-rw-r--r--src/include/ndpi_win32.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h
index b79a880e8..03f1389df 100644
--- a/src/include/ndpi_win32.h
+++ b/src/include/ndpi_win32.h
@@ -76,25 +76,10 @@ typedef uint u_int32_t;
typedef uint u_int;
typedef unsigned __int64 u_int64_t;
-#define pthread_t HANDLE
-#define pthread_mutex_t HANDLE
-#define pthread_rwlock_t pthread_mutex_t
-#define pthread_rwlock_init pthread_mutex_init
-#define pthread_rwlock_wrlock pthread_mutex_lock
-#define pthread_rwlock_rdlock pthread_mutex_lock
-#define pthread_rwlock_unlock pthread_mutex_unlock
-#define pthread_rwlock_destroy pthread_mutex_destroy
+#define gmtime_r(a, b) memcpy(b, gmtime(a), sizeof(struct tm))
-#define gmtime_r(a, b) memcpy(b, gmtime(a), sizeof(struct tm))
-
-#define in_addr_t unsigned long
-
-extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */);
-
-#define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */)
-#define strtok_r strtok_s
#define timegm _mkgmtime
-extern struct tm* localtime_r(const time_t* timep, struct tm* r);
+#define sleep(a /* sec */) Sleep(1000*a /* ms */)
#endif /* __NDPI_WIN32_H__ */