net-mgmt/pmacct: fix build with SQLITE3 option and with -fno-common

PR:		249029
Submitted by:	Olivier Cochard <olivier@freebsd.org>
This commit is contained in:
Kurt Jaeger 2020-10-04 18:14:23 +00:00
parent 8726ef6b4e
commit b2584aff1b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=551438

View File

@ -1,6 +1,27 @@
--- src/sql_common.c.orig 2020-05-10 13:57:54 UTC
+++ src/sql_common.c
@@ -126,8 +126,8 @@ void sql_init_global_buffers()
@@ -45,8 +45,8 @@ unsigned char *pipebuf;
struct db_cache *sql_cache;
struct db_cache **sql_queries_queue, **sql_pending_queries_queue;
struct db_cache *collision_queue;
-int cq_ptr, qq_ptr, qq_size, pp_size, pb_size, pn_size, pm_size, pt_size;
-int pc_size, dbc_size, cq_size, pqq_ptr;
+int cq_ptr, qq_size;
+int cq_size;
struct db_cache lru_head, *lru_tail;
struct frags where[N_PRIMITIVES+2];
struct frags values[N_PRIMITIVES+2];
@@ -60,8 +60,7 @@ time_t glob_committed_basetime; /* last resort for sig
int glob_dyn_table, glob_dyn_table_time_only; /* last resort for signal handling */
int glob_timeslot; /* last resort for sql handlers */
-struct sqlfunc_cb_registry sqlfunc_cbr;
-void (*insert_func)(struct primitives_ptrs *, struct insert_data *);
+struct sqlfunc_cb_registry sqlfunc_cbr;
struct DBdesc p;
struct DBdesc b;
struct BE_descs bed;
@@ -126,8 +125,8 @@ void sql_init_global_buffers()
lru_tail = &lru_head;
Log(LOG_INFO, "INFO ( %s/%s ): cache entries=%d base cache memory=%luu bytes\n", config.name, config.type,