aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni <matzeton@googlemail.com>2024-03-15 12:47:13 +0100
committerGitHub <noreply@github.com>2024-03-15 12:47:13 +0100
commit15f61e7abee4ba3957108ae7927dac19658e8e52 (patch)
tree0f73931131c13f46bc5fbc8270ca4a496994eb6d
parent231748bb0e6f274eb91824bf1e3b1693370ec0de (diff)
Enable `USE_GLOBAL_CONTEXT` via `CFLAGS` passed to the CC. (#2348)
* `ndpi_typedefs.h`: requires to include `ndpi_config.h` for the `HAVE_STRUCT_TIMESPEC` check That will never happen, because `USE_GLOBAL_CONTEXT` is defined inside `ndpi_config.h`. It's better to use `CFLAGS` to achieve the same. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 226835bfd..8323c25da 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -311,7 +311,7 @@ jobs:
- name: Configure nDPI on Ubuntu
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
run: |
- AR=${{ matrix.ar }} RANLIB=${{ matrix.ranlib }} ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs ${{matrix.lto_gold_linker}}
+ AR=${{ matrix.ar }} RANLIB=${{ matrix.ranlib }} ./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs ${{matrix.lto_gold_linker}} ${{matrix.global_context}}
- name: Configure nDPI on MacOS
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc')
run: |
diff --git a/configure.ac b/configure.ac
index 8a37cac72..94b379f7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,7 +220,7 @@ fi
GLOBAL_CONTEXT_ENABLED=0
AS_IF([test "x$enable_global_context_support" != "xno"], [
AC_CHECK_LIB([pthread], [pthread_mutex_init])
- AC_DEFINE_UNQUOTED(USE_GLOBAL_CONTEXT, 1, [Use gloabl context feature. Depend on libpthread])
+ NDPI_CFLAGS="${NDPI_CFLAGS} -DUSE_GLOBAL_CONTEXT"
GLOBAL_CONTEXT_ENABLED=1
])