[PATCH] Use sys/uio.h for writev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With glibc >= 2.25.90 writev() is only available if you explicitly
include sys/uio.h

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---

A build breaker, but not yet pushed in case anyone has opinions...

 configure.ac      | 2 +-
 src/util/virlog.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1a73b34..1a48bb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,7 +328,7 @@ dnl Availability of various common headers (non-fatal if missing).
 AC_CHECK_HEADERS([pwd.h regex.h sys/un.h \
   sys/poll.h syslog.h mntent.h net/ethernet.h linux/magic.h \
   sys/un.h sys/syscall.h sys/sysctl.h netinet/tcp.h ifaddrs.h \
-  libtasn1.h sys/ucred.h sys/mount.h stdarg.h])
+  libtasn1.h sys/ucred.h sys/mount.h stdarg.h sys/uio.h])
 dnl Check whether endian provides handy macros.
 AC_CHECK_DECLS([htole64], [], [], [[#include <endian.h>]])
 AC_CHECK_FUNCS([stat stat64 __xstat __xstat64 lstat lstat64 __lxstat __lxstat64])
diff --git a/src/util/virlog.c b/src/util/virlog.c
index 7933e1a..3a28e5e 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -32,6 +32,9 @@
 #include <unistd.h>
 #include <execinfo.h>
 #include <regex.h>
+#if HAVE_SYS_UIO_H
+# include <sys/uio.h>
+#endif
 #if HAVE_SYSLOG_H
 # include <syslog.h>
 #endif
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux