From 22af774800f9ed16be93a5cc8ad9927d0d7ca44f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 29 Jan 2020 08:27:43 +0100 Subject: [PATCH] threading: fix global declaration of trans_q (cherry picked from commit bd3fac73b1c20eba1577023adb7cafc80b083bd3) --- src/suricata.h | 5 +---- src/tm-threads.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/suricata.h b/src/suricata.h index e8d1184184..99fcabe913 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -125,10 +125,7 @@ enum { #include "runmodes.h" -/* queue's between various other threads - * XXX move to the TmQueue structure later - */ -PacketQueue trans_q[256]; +extern PacketQueue trans_q[256]; typedef struct SCInstance_ { enum RunModes run_mode; diff --git a/src/tm-threads.c b/src/tm-threads.c index b37d073bc1..b31b72293b 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -95,6 +95,11 @@ ThreadVars *tv_root[TVT_MAX] = { NULL }; /* lock to protect tv_root */ SCMutex tv_root_lock = SCMUTEX_INITIALIZER; +/* queue's between various other threads + * XXX move to the TmQueue structure later + */ +PacketQueue trans_q[256]; + /** * \brief Check if a thread flag is set. * -- 2.47.2