]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/udp_queue: appease the linker if not optimized
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 5 Aug 2019 13:22:07 +0000 (15:22 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 5 Aug 2019 14:39:02 +0000 (16:39 +0200)
daemon/udp_queue.c

index 6d1fec0d80b8b37903a9f4a2620e46bdd937ade6..586f64d970f84371c04ea42517bbbaa139e16a9f 100644 (file)
 #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 <assert.h>
-#include <stdlib.h>
 #include <sys/socket.h>
 
+
+#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