diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_typedefs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index ebad711f1..11a8e05a2 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -25,9 +25,12 @@ E * ndpi_typedefs.h #define __NDPI_TYPEDEFS_H__ #ifndef NDPI_CFFI_PREPROCESSING +#include "ndpi_config.h" +#ifdef USE_GLOBAL_CONTEXT #define HAVE_STRUCT_TIMESPEC #include <pthread.h> #endif +#endif #include "ndpi_define.h" #ifndef NDPI_CFFI_PREPROCESSING @@ -769,8 +772,10 @@ struct ndpi_lru_cache { u_int32_t num_entries; u_int32_t ttl : 31, shared : 1; #ifndef NDPI_CFFI_PREPROCESSING +#ifdef USE_GLOBAL_CONTEXT pthread_mutex_t mutex; #endif +#endif struct ndpi_lru_cache_stats stats; struct ndpi_lru_cache_entry *entries; }; |