Use sys/uio.h for writev()

With glibc >= 2.25.90 writev() is only available if you explicitly
include sys/uio.h. This matches the documented requirements, but
older glibc and other *NIX pulled in writev indirectly so the bug
wasn't noticed previously.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2017-06-14 14:38:01 +01:00
parent d9e97fd960
commit 5e9ca5508d

View File

@ -32,6 +32,7 @@
#include <unistd.h> #include <unistd.h>
#include <execinfo.h> #include <execinfo.h>
#include <regex.h> #include <regex.h>
#include <sys/uio.h>
#if HAVE_SYSLOG_H #if HAVE_SYSLOG_H
# include <syslog.h> # include <syslog.h>
#endif #endif