Fix compilation on Windows (#2072)
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ CFLAGS += -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @NDPI_CF
|
||||
LDFLAGS += @NDPI_LDFLAGS@
|
||||
LIBS = @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@
|
||||
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
|
||||
OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst third_party/src/hll/%.c, third_party/src/hll/%.o, $(wildcard third_party/src/hll/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
|
||||
HEADERS = $(wildcard ../include/*.h)
|
||||
NDPI_VERSION_MAJOR = @NDPI_MAJOR@
|
||||
NDPI_LIB_STATIC = libndpi.a
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <float.h> /* FLT_EPSILON */
|
||||
#include "ndpi_api.h"
|
||||
#include "ndpi_config.h"
|
||||
#include "third_party/include/hll.h"
|
||||
|
||||
/* ********************************************************************************* */
|
||||
|
||||
@@ -298,8 +299,6 @@ const char* ndpi_data_ratio2str(float ratio) {
|
||||
/* ********************************************************************************* */
|
||||
/* ********************************************************************************* */
|
||||
|
||||
#include "third_party/src/hll/hll.c"
|
||||
|
||||
int ndpi_hll_init(struct ndpi_hll *hll, u_int8_t bits) {
|
||||
return(hll_init(hll, bits));
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "ndpi_includes.h"
|
||||
#include "ndpi_encryption.h"
|
||||
|
||||
#include "third_party/src/hll/MurmurHash3.c"
|
||||
#include "third_party/include/MurmurHash3.h"
|
||||
|
||||
/* ******************************************* */
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef _MURMURHASH3_H_
|
||||
#define _MURMURHASH3_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "ndpi_includes.h"
|
||||
|
||||
uint32_t MurmurHash(const void * key, uint32_t len, uint32_t seed);
|
||||
|
||||
|
||||
Vendored
+1
@@ -25,3 +25,4 @@ extern int hll_init(struct ndpi_hll *hll, u_int8_t bits);
|
||||
extern void hll_destroy(struct ndpi_hll *hll);
|
||||
extern int hll_add(struct ndpi_hll *hll, const void *buf, size_t size);
|
||||
extern double hll_count(const struct ndpi_hll *hll);
|
||||
extern void hll_reset(struct ndpi_hll *hll);
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*-----------------------------------------------------------------------------
|
||||
MurmurHash3 was written by Austin Appleby, and is placed in the public
|
||||
domain. The author hereby disclaims copyright to this source code.
|
||||
xo*/
|
||||
*/
|
||||
|
||||
#include "MurmurHash3.h"
|
||||
|
||||
|
||||
Vendored
+3
-1
@@ -26,7 +26,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ndpi_api.h>
|
||||
#include <ndpi_main.h>
|
||||
#include "ndpi_typedefs.h"
|
||||
#include "../include/MurmurHash3.h"
|
||||
#include "../include/hll.h"
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
<ClCompile Include="..\src\lib\ndpi_community_id.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_geoip.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_main.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_filter.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_memory.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_serializer.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_utils.c" />
|
||||
@@ -331,6 +332,8 @@
|
||||
<ClCompile Include="..\src\lib\third_party\src\ndpi_sha1.c" />
|
||||
<ClCompile Include="..\src\lib\third_party\src\sha1-fast.c" />
|
||||
<ClCompile Include="..\src\lib\third_party\src\strptime.c" />
|
||||
<ClCompile Include="..\src\lib\third_party\src\hll\MurmurHash3.c" />
|
||||
<ClCompile Include="..\src\lib\third_party\src\hll\hll.c" />
|
||||
<ClCompile Include="src\getopt.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
<ClCompile Include="..\src\lib\ndpi_community_id.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_geoip.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_main.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_filter.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_memory.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_serializer.c" />
|
||||
<ClCompile Include="..\src\lib\ndpi_utils.c" />
|
||||
@@ -202,6 +203,12 @@
|
||||
<ClCompile Include="..\src\lib\third_party\src\strptime.c">
|
||||
<Filter>third_party</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib\third_party\src\hll\MurmurHash3.c" />
|
||||
<Filter>third_party</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib\third_party\src\hll\hll.c" />
|
||||
<Filter>third_party</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\lib\protocols\tocaboca.c" />
|
||||
<ClCompile Include="..\src\lib\protocols\raknet.c" />
|
||||
<ClCompile Include="..\src\lib\protocols\sd_rtn.c" />
|
||||
|
||||
Reference in New Issue
Block a user