]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
host: fix global declarations
authorVictor Julien <victor@inliniac.net>
Wed, 29 Jan 2020 09:37:44 +0000 (10:37 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 11 Feb 2020 19:38:50 +0000 (20:38 +0100)
src/host.c
src/host.h

index 548b31abbbc01c567d4c48eecc9b6b4be22a12be..4e79be14daf54d2091f85d673692a3e65f5f0108 100644 (file)
 
 static Host *HostGetUsedHost(void);
 
+/** host hash table */
+HostHashRow *host_hash;
 /** queue with spare hosts */
 static HostQueue host_spare_q;
+HostConfig host_config;
+
+SC_ATOMIC_DECLARE(uint64_t,host_memuse);
+SC_ATOMIC_DECLARE(uint32_t,host_counter);
+SC_ATOMIC_DECLARE(uint32_t,host_prune_idx);
 
 /** size of the host object. Maybe updated in HostInitConfig to include
  *  the storage APIs additions. */
index 9a7b811b2a8517cd8ff4272d65cdf9911af8a5f9..e44cc5368a212d830259a52e9aca2cfb1baa5c93 100644 (file)
@@ -87,7 +87,7 @@ typedef struct HostHashRow_ {
 } __attribute__((aligned(CLS))) HostHashRow;
 
 /** host hash table */
-HostHashRow *host_hash;
+extern HostHashRow *host_hash;
 
 #define HOST_VERBOSE    0
 #define HOST_QUIET      1
@@ -128,10 +128,10 @@ typedef struct HostConfig_ {
         }                                             \
     } while (0)
 
-HostConfig host_config;
-SC_ATOMIC_DECLARE(uint64_t,host_memuse);
-SC_ATOMIC_DECLARE(uint32_t,host_counter);
-SC_ATOMIC_DECLARE(uint32_t,host_prune_idx);
+extern HostConfig host_config;
+SC_ATOMIC_EXTERN(uint64_t,host_memuse);
+SC_ATOMIC_EXTERN(uint32_t,host_counter);
+SC_ATOMIC_EXTERN(uint32_t,host_prune_idx);
 
 void HostInitConfig(char quiet);
 void HostShutdown(void);