mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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 <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
ff627b4726
commit
3aab3362f6
@ -28,7 +28,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/uio.h>
|
|
||||||
#if HAVE_SYSLOG_H
|
#if HAVE_SYSLOG_H
|
||||||
# include <syslog.h>
|
# include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
@ -52,6 +51,7 @@
|
|||||||
* htole64. */
|
* htole64. */
|
||||||
#if HAVE_SYSLOG_H && defined(__linux__) && HAVE_DECL_HTOLE64
|
#if HAVE_SYSLOG_H && defined(__linux__) && HAVE_DECL_HTOLE64
|
||||||
# define USE_JOURNALD 1
|
# define USE_JOURNALD 1
|
||||||
|
# include <sys/uio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
Loading…
Reference in New Issue
Block a user