diff options
Diffstat (limited to 'src/include/ndpi_win32.h')
-rw-r--r-- | src/include/ndpi_win32.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h index 8a952b293..db309faff 100644 --- a/src/include/ndpi_win32.h +++ b/src/include/ndpi_win32.h @@ -24,7 +24,15 @@ #ifndef __NDPI_WIN32_H__ #define __NDPI_WIN32_H__ +// fix a MinGW build issue "error: multiple storage classes in declaration specifiers" due to MinGW +// defining extern for __forceinline types +#if (defined(__MINGW32__) || defined(__MINGW64__)) && defined(__GNUC__) +#define MINGW_GCC +#define __mingw_forceinline __inline__ __attribute__((__always_inline__,__gnu_inline__)) +#endif + #include <winsock2.h> +#include <windows.h> #include <ws2tcpip.h> #include <process.h> #include <io.h> @@ -40,7 +48,7 @@ #define IPVERSION 4 /* on *nix it is defined in netinet/ip.h */ -extern char* strsep(char **sp, const char *sep); +extern char* strsep(char **sp, char *sep); typedef unsigned char u_char; typedef unsigned short u_short; |