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

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



On Wed, Jun 14, 2017 at 02:39:27PM +0100, Daniel P. Berrange wrote:
With glibc >= 2.25.90 writev() is only available if you explicitly
include sys/uio.h

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---

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


Even older ones require that, actually, so we should've done that even
before.  I'm not sure we need to include it conditionally, but ACK to
this version.

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 redhat com
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature


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