From d7b04fc45187c1560f5f26fe00f9ebf5ed5495d5 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 31 Aug 2017 12:45:16 +0300 Subject: [PATCH] Add static storage to anonymous unit/thread structures Without static, CentOS6 complains about non-local variable using anonymous type. --- server/core/dcb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/dcb.cc b/server/core/dcb.cc index dd0bfed52..fa23b5a54 100644 --- a/server/core/dcb.cc +++ b/server/core/dcb.cc @@ -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. */