diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_includes.h | 5 | ||||
-rw-r--r-- | src/include/ndpi_unix.h | 3 | ||||
-rw-r--r-- | src/include/ndpi_win32.h | 19 |
3 files changed, 2 insertions, 25 deletions
diff --git a/src/include/ndpi_includes.h b/src/include/ndpi_includes.h index 197f32fce..3b87dda65 100644 --- a/src/include/ndpi_includes.h +++ b/src/include/ndpi_includes.h @@ -38,7 +38,6 @@ #else #include <sys/types.h> #include <sys/param.h> -#include <pthread.h> #include <arpa/inet.h> #include <sys/time.h> #include <sys/socket.h> @@ -57,10 +56,6 @@ #if defined __NetBSD__ || defined __OpenBSD__ #include <netinet/in_systm.h> -#if defined __OpenBSD__ -#include <pthread.h> - -#endif #endif #endif #endif diff --git a/src/include/ndpi_unix.h b/src/include/ndpi_unix.h index 6e6987bfd..f4901761e 100644 --- a/src/include/ndpi_unix.h +++ b/src/include/ndpi_unix.h @@ -28,9 +28,6 @@ #include <netinet/in.h> #if defined(__NetBSD__) || defined(__OpenBSD__) #include <netinet/in_systm.h> -#if defined(__OpenBSD__) -#include <pthread.h> -#endif #endif #endif 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__ */ |