From 8d54440339cd67f7d0b16f1908df77408ceab2e0 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 18 Dec 2023 10:31:45 +0100 Subject: [PATCH] Include if available This avoids implicit declarations of warn and warnx and compilation failures with Clang 16 and GCC 14. Fixes commit d89d9b15eb8ca3a6b18b ("Check return value of the read("/dev/urandom"). Just in case.") and commit 44fea8a6a4f1de1e0cb5 ("Also check if we got the amount of bytes that we expected."). --- pertools/udp_contention/udp_contention.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pertools/udp_contention/udp_contention.c b/pertools/udp_contention/udp_contention.c index 2105eab1c..98566b86e 100644 --- a/pertools/udp_contention/udp_contention.c +++ b/pertools/udp_contention/udp_contention.c @@ -1,3 +1,5 @@ +#include "config.h" + #include #include #include @@ -17,6 +19,10 @@ #include #include +#if HAVE_ERR_H +#include +#endif + #define UC_MAX_THREADS 64 #if defined(__FreeBSD__) @@ -60,8 +66,6 @@ srandomdev(void) # endif #endif -#include "config.h" - #include "elperiodic.h" #include "rtpp_network.h"