aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraouinizied <aouinizied@gmail.com>2022-04-07 17:54:41 +0200
committeraouinizied <aouinizied@gmail.com>2022-04-07 17:54:41 +0200
commitff993e2f57afbe2ac89f2da135aec37a31ec6832 (patch)
treeea3819aa1d0be77193fc9576fe3b3f7c6aee9e84
parenta6e2f4a15a52087ff3f2fa16bb990c998c5215a6 (diff)
Python bindings fix.
-rw-r--r--configure.ac1
-rw-r--r--python/README.md3
-rw-r--r--src/include/ndpi_typedefs.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ce31803c7..2815aebbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,7 +96,6 @@ AC_DEFINE_UNQUOTED(NDPI_GIT_DATE, "${GIT_DATE}", [Last GIT change])
if ! test "${with_only_libndpi+set}" = set; then :
dnl> used by json-c for unit tests
- PKG_CHECK_MODULES([JSONC], [json-c], [JSONC_LIBS="${pkg_cv_JSONC_LIBS}" JSONC_CFLAGS="${pkg_cv_JSONC_CFLAGS}"])
AC_CHECK_LIB([json-c], [json_object_put], [], [
AC_MSG_WARN([JSON-C not available. Disabled unit test.])
JSONC_LIBS=""
diff --git a/python/README.md b/python/README.md
index dd8ab55c9..f1820f2b0 100644
--- a/python/README.md
+++ b/python/README.md
@@ -22,8 +22,9 @@ sudo make install
``` bash
cd python
+python3 -m pip install --upgrade pip
python3 -m install -r dev_requirements.txt
-python3 setup.py install
+python3 -m pip install .
```
## Usage
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 41069f8b4..b13af095f 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -172,6 +172,7 @@ typedef u_int32_t ndpi_ndpi_mask;
/* NDPI_PROTO_BITMASK_STRUCT */
#ifdef NDPI_CFFI_PREPROCESSING
+#undef NDPI_NUM_FDS_BITS
#define NDPI_NUM_FDS_BITS 16
#endif
@@ -206,6 +207,8 @@ typedef void (*ndpi_debug_function_ptr) (u_int32_t protocol, void *module_struct
/* PLEASE DO NOT REMOVE OR CHANGE THE ORDER OF WHAT IS DELIMITED BY CFFI.NDPI_PACKED_STRUCTURES FLAG AS IT IS USED FOR
PYTHON BINDINGS AUTO GENERATION */
#ifdef NDPI_CFFI_PREPROCESSING
+#undef PACK_ON
+#undef PACK_OFF
#define PACK_ON
#define PACK_OFF
#endif