Add static storage to anonymous unit/thread structures

Without static, CentOS6 complains about non-local variable
using anonymous type.
This commit is contained in:
Johan Wikman 2017-08-31 12:45:16 +03:00
parent a0cf053102
commit d7b04fc451

View File

@ -69,14 +69,14 @@ using maxscale::Semaphore;
namespace
{
struct
static struct
{
DCB dcb_initialized; /** A DCB with null values, used for initialization. */
DCB** all_dcbs; /** #workers sized array of pointers to DCBs where dcbs are listed. */
bool check_timeouts; /** Should session timeouts be checked. */
} this_unit;
thread_local struct
static thread_local struct
{
long next_timeout_check; /** When to next check for idle sessions. */
DCB* current_dcb; /** The DCB currently being handled by event handlers. */