From: Vladimír Čunát Date: Mon, 5 Aug 2019 13:22:07 +0000 (+0200) Subject: daemon/udp_queue: appease the linker if not optimized X-Git-Tag: v4.2.0^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa8e24f362c7424abe404def5563ea08b46fcd37;p=thirdparty%2Fknot-resolver.git daemon/udp_queue: appease the linker if not optimized --- diff --git a/daemon/udp_queue.c b/daemon/udp_queue.c index 6d1fec0d8..586f64d97 100644 --- a/daemon/udp_queue.c +++ b/daemon/udp_queue.c @@ -17,13 +17,6 @@ #include "kresconfig.h" #include "daemon/udp_queue.h" -#if !ENABLE_SENDMMSG -int udp_queue_init_global(uv_loop_t *loop) -{ - return 0; -} -#else - #include "daemon/session.h" #include "daemon/worker.h" #include "lib/generic/array.h" @@ -32,9 +25,21 @@ int udp_queue_init_global(uv_loop_t *loop) struct qr_task; #include -#include #include + +#if !ENABLE_SENDMMSG +int udp_queue_init_global(uv_loop_t *loop) +{ + return 0; +} +/* Appease the linker in case this unused call isn't optimized out. */ +void udp_queue_push(int fd, struct kr_request *req, struct qr_task *task) +{ + abort(); +} +#else + /* LATER: it might be useful to have this configurable during runtime, * but the structures below would have to change a little (broken up). */ #define UDP_QUEUE_LEN 64