Completly disable all pthread related code in the library if USE_GLOBAL_CONTEXT macro is not defined. (#2302)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -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,7 +772,9 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user