diff options
Diffstat (limited to 'src/include/ndpi_win32.h')
-rw-r--r-- | src/include/ndpi_win32.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h index f653caa51..645c022e5 100644 --- a/src/include/ndpi_win32.h +++ b/src/include/ndpi_win32.h @@ -22,36 +22,34 @@ * */ -#ifndef __NDPI_WIN32_INCLUDE_FILE__ -#define __NDPI_WIN32_INCLUDE_FILE__ +#ifndef __NDPI_WIN32_H__ +#define __NDPI_WIN32_H__ -#ifdef WIN32 -#include <Winsock2.h> /* winsock.h is included automatically */ +#include <winsock2.h> +#include <ws2tcpip.h> #include <process.h> #include <io.h> -#include <getopt.h> /* getopt from: http://www.pwilson.net/sample.html. */ -#include <process.h> /* for getpid() and the exec..() family */ +#include <getopt.h> /* getopt from: http://www.pwilson.net/sample.html. */ +#include <process.h> /* for getpid() and the exec..() family */ +#include <stdint.h> #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif -#define snprintf _snprintf -extern char* strsep(char **stringp, const char *delim); +#define _WS2TCPIP_H_ /* Avoid compilation problems */ + +extern char* strsep(char **sp, const char *sep); -#define __attribute__(x) -#include <stdint.h> -#ifndef __GNUC__ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int uint; typedef unsigned long u_long; -#endif -typedef u_char u_int8_t; -typedef u_short u_int16_t; -typedef unsigned int u_int32_t; -typedef unsigned __int64 u_int64_t; - +typedef u_char u_int8_t; +typedef u_short u_int16_t; +typedef uint u_int32_t; +typedef uint u_int; +typedef unsigned __int64 u_int64_t; #define pthread_t HANDLE #define pthread_mutex_t HANDLE @@ -68,6 +66,4 @@ extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */); #define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */) -#endif /* Win32 */ - -#endif /* __NDPI_WIN32_INCLUDE_FILE__ */ +#endif /* __NDPI_WIN32_H__ */ |