diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-06-11 15:07:17 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-06-12 15:07:17 +0200 |
commit | 165b18c82933bfbab41673804811df518c092d50 (patch) | |
tree | 79a561a975cb9bb82f783fd1fbc316be846f82d1 /examples/c-influxd | |
parent | 1fbfd46fe81890b6ff82f1b7faf863379c20ce67 (diff) |
Fixed OpenWrt `nDPId-testing` build.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-influxd')
-rw-r--r-- | examples/c-influxd/c-influxd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/c-influxd/c-influxd.c b/examples/c-influxd/c-influxd.c index 6477480f6..6ab88a9c7 100644 --- a/examples/c-influxd/c-influxd.c +++ b/examples/c-influxd/c-influxd.c @@ -1,5 +1,6 @@ #include <curl/curl.h> #include <pthread.h> +#include <signal.h> #include <stdio.h> #include <string.h> #include <sys/epoll.h> @@ -737,7 +738,7 @@ static int init_influx_ctx(struct influx_ctx * const ctx, char const * const url if (curl_easy_setopt(ctx->curl, CURLOPT_URL, url) != CURLE_OK || curl_easy_setopt(ctx->curl, CURLOPT_USERAGENT, "nDPIsrvd-influxd") != CURLE_OK || curl_easy_setopt(ctx->curl, CURLOPT_HTTPHEADER, ctx->http_header) != CURLE_OK || - curl_easy_setopt(ctx->curl, CURLOPT_TIMEOUT, influxdb_interval_ull) != CURLE_OK) + curl_easy_setopt(ctx->curl, CURLOPT_TIMEOUT, (long)influxdb_interval_ull) != CURLE_OK) { return -1; } @@ -774,7 +775,7 @@ static void post_influx_ctx(struct influx_ctx * const ctx) static void * send_to_influxdb(void * thread_data) { - struct influx_ctx influx_ctx; + struct influx_ctx influx_ctx = {}; (void)thread_data; init_influx_ctx(&influx_ctx, influxdb_url, influxdb_token); |