diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/Makefile.in | 9 | ||||
-rw-r--r-- | tests/unit/unit.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/unit/Makefile.in b/tests/unit/Makefile.in index efbd387c8..98a3d67f4 100644 --- a/tests/unit/Makefile.in +++ b/tests/unit/Makefile.in @@ -1,5 +1,6 @@ CC=@CC@ CXX=@CXX@ +BUILD_MINGW=@BUILD_MINGW@ SRCHOME=../../src @@ -10,6 +11,12 @@ HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHO OBJS=unit PREFIX?=@prefix@ +ifneq ($(BUILD_MINGW),) +all: + @echo 'Unit tests disabled due to mingw build.' + +else + all: unit EXECUTABLE_SOURCES := unit.c @@ -34,3 +41,5 @@ distdir: distclean: clean /bin/rm -f Makefile + +endif diff --git a/tests/unit/unit.c b/tests/unit/unit.c index 2842638c2..d17ab3e89 100644 --- a/tests/unit/unit.c +++ b/tests/unit/unit.c @@ -33,6 +33,8 @@ #else #include <unistd.h> #include <netinet/in.h> +#include <sys/socket.h> +#include <sys/mman.h> #endif #include <stdio.h> @@ -44,12 +46,10 @@ #include <pcap.h> #include <signal.h> #include <pthread.h> -#include <sys/socket.h> #include <assert.h> #include <math.h> #include <sys/stat.h> #include <fcntl.h> -#include <sys/mman.h> #include <libgen.h> #include "ndpi_config.h" |