From: Daniel P. Berrangé Date: Wed, 22 Jan 2020 11:49:45 +0000 (+0000) Subject: src: only import sys/uio.h when journald is built X-Git-Tag: v6.1.0-rc1~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aab3362f6d92d916bfc8ff3e97a89fbfcfe8329;p=thirdparty%2Flibvirt.git src: only import sys/uio.h when journald is built The sys/uio.h header is only needed when building logging code with journald support enabled. Conditionally include it so that we avoid break on platforms which lack this header. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- diff --git a/src/util/virlog.c b/src/util/virlog.c index ddc3ac1edb..8c17d666de 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -28,7 +28,6 @@ #include #include #include -#include #if HAVE_SYSLOG_H # include #endif @@ -52,6 +51,7 @@ * htole64. */ #if HAVE_SYSLOG_H && defined(__linux__) && HAVE_DECL_HTOLE64 # define USE_JOURNALD 1 +# include #endif #define VIR_FROM_THIS VIR_FROM_NONE