Fix compilation error when --disable-cloud is specified (#14695)
Fix compilations errors when --disable-cloud is specified
Stelios Fragkakis committed
Mar 9, 2023 at 21:12 UTC
e60b0ffe1752a0d744644e69f9cb301a34a1e945
1 file changed
+4
-7
database/sqlite/sqlite_aclk.c
+4
-7
@@ -27,6 +27,7 @@ void schedule_node_info_update(RRDHOST *host)
27
aclk_database_enq_cmd(wc, &cmd);
28
}
29
30
+#ifdef ENABLE_ACLK
31
static int sql_check_aclk_table(void *data, int argc, char **argv, char **column)
32
{
33
struct aclk_database_worker_config *wc = data;
@@ -161,6 +162,7 @@ void sql_delete_aclk_table_list(struct aclk_database_worker_config *wc, struct a
162
fail:
163
buffer_free(sql);
164
}
165
+#endif
166
167
uv_mutex_t aclk_async_lock;
168
struct aclk_database_worker_config *aclk_thread_head = NULL;
@@ -467,7 +469,7 @@ void sql_aclk_sync_init(void)
469
info("ACLK sync initialization completed");
470
#endif
471
}
470
-
472
+#ifdef ENABLE_ACLK
473
static void async_cb(uv_async_t *handle)
474
{
475
uv_stop(handle->loop);
@@ -482,7 +484,6 @@ static void timer_cb(uv_timer_t* handle)
484
uv_stop(handle->loop);
485
uv_update_time(handle->loop);
486
485
-#ifdef ENABLE_ACLK
487
struct aclk_database_worker_config *wc = handle->data;
488
struct aclk_database_cmd cmd;
489
memset(&cmd, 0, sizeof(cmd));
@@ -504,7 +505,6 @@ static void timer_cb(uv_timer_t* handle)
505
aclk_database_enq_cmd_noblock(wc, &cmd);
506
}
507
}
507
-#endif
508
}
509
510
static void aclk_database_worker(void *arg)
@@ -636,7 +636,6 @@ static void aclk_database_worker(void *arg)
636
debug(D_ACLK_SYNC, "Queueing removed alerts for node %s", wc->host_guid);
637
sql_process_queue_removed_alerts_to_aclk(wc, cmd);
638
break;
639
-
639
// NODE OPERATIONS
640
case ACLK_DATABASE_NODE_STATE:
641
debug(D_ACLK_SYNC,"Sending state update for %s", wc->uuid_str);
@@ -654,15 +653,12 @@ static void aclk_database_worker(void *arg)
653
debug(D_ACLK_SYNC,"Sending node collectors info for %s", wc->uuid_str);
654
sql_build_node_collectors(wc);
655
break;
657
-#ifdef ENABLE_ACLK
658
-
656
// NODE_INSTANCE DETECTION
657
case ACLK_DATABASE_ORPHAN_HOST:
658
wc->host = NULL;
659
wc->is_orphan = 1;
660
aclk_add_worker_thread(wc);
661
break;
665
-#endif
662
case ACLK_DATABASE_TIMER:
663
if (unlikely(localhost && !wc->host && !wc->is_orphan)) {
664
if (claimed()) {
@@ -744,6 +740,7 @@ error_after_loop_init:
740
freez(loop);
741
worker_unregister();
742
}
743
+#endif
744
745
// -------------------------------------------------------------
746