From: Victor Julien Date: Wed, 29 Jan 2020 07:27:43 +0000 (+0100) Subject: threading: fix global declaration of trans_q X-Git-Tag: suricata-4.1.7~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4542%2Fhead;p=thirdparty%2Fsuricata.git threading: fix global declaration of trans_q (cherry picked from commit bd3fac73b1c20eba1577023adb7cafc80b083bd3) --- 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. *