Include unistd.h in all files that use it, instead
of relying on it being pulled in via virutil.h
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/lxc/lxc_conf.c | 2 ++
src/lxc/lxc_fuse.c | 1 +
src/util/virperf.c | 1 +
src/util/virpolkit.c | 1 +
src/util/virresctrl.c | 1 +
tests/objecteventtest.c | 2 ++
tests/scsihosttest.c | 1 +
tests/vboxsnapshotxmltest.c | 2 ++
tests/virfiletest.c | 1 +
tests/virscsitest.c | 1 +
tests/virstoragetest.c | 1 +
tests/virsystemdtest.c | 1 +
12 files changed, 15 insertions(+)
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
index 43022a3441..8469f30b9e 100644
--- a/src/lxc/lxc_conf.c
+++ b/src/lxc/lxc_conf.c
@@ -23,6 +23,8 @@
/* includes */
#include <config.h>
+#include <unistd.h>
+
#include "lxc_conf.h"
#include "lxc_domain.h"
#include "virerror.h"
diff --git a/src/lxc/lxc_fuse.c b/src/lxc/lxc_fuse.c
index 44f240a0b5..164b284bb8 100644
--- a/src/lxc/lxc_fuse.c
+++ b/src/lxc/lxc_fuse.c
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <sys/mount.h>
#include <mntent.h>
+#include <unistd.h>
#include "lxc_fuse.h"
#include "lxc_cgroup.h"
diff --git a/src/util/virperf.c b/src/util/virperf.c
index 04d27309e1..90d60c04fb 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -17,6 +17,7 @@
*/
#include <config.h>
+#include <unistd.h>
#ifndef WIN32
# include <sys/ioctl.h>
#endif
diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 5c2d0d4bd4..5a9fa0cfed 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -20,6 +20,7 @@
*/
#include <config.h>
+#include <unistd.h>
#include "virpolkit.h"
#include "virerror.h"
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 569a9ee770..c537d606cc 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <unistd.h>
#define LIBVIRT_VIRRESCTRLPRIV_H_ALLOW
#include "virresctrlpriv.h"
diff --git a/tests/objecteventtest.c b/tests/objecteventtest.c
index 80889339bd..1e84d4be11 100644
--- a/tests/objecteventtest.c
+++ b/tests/objecteventtest.c
@@ -19,6 +19,8 @@
#include <config.h>
+#include <unistd.h>
+
#include "testutils.h"
#include "virerror.h"
diff --git a/tests/scsihosttest.c b/tests/scsihosttest.c
index e8193836ff..b58318d295 100644
--- a/tests/scsihosttest.c
+++ b/tests/scsihosttest.c
@@ -25,6 +25,7 @@
# include <fcntl.h>
# include <sys/stat.h>
+# include <unistd.h>
# include "virstring.h"
# include "virerror.h"
# include "virlog.h"
diff --git a/tests/vboxsnapshotxmltest.c b/tests/vboxsnapshotxmltest.c
index dbeebec196..2ea460d8bd 100644
--- a/tests/vboxsnapshotxmltest.c
+++ b/tests/vboxsnapshotxmltest.c
@@ -1,5 +1,7 @@
#include <config.h>
+#include <unistd.h>
+
#include "testutils.h"
#ifdef WITH_VBOX
diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index a412fdad23..d410bb68e4 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -19,6 +19,7 @@
#include <config.h>
#include <fcntl.h>
+#include <unistd.h>
#include "testutils.h"
#include "virfile.h"
diff --git a/tests/virscsitest.c b/tests/virscsitest.c
index d5a0da4753..47035e927e 100644
--- a/tests/virscsitest.c
+++ b/tests/virscsitest.c
@@ -19,6 +19,7 @@
#include <config.h>
+#include <unistd.h>
#include "virscsi.h"
#include "testutils.h"
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 39040bf4cb..50f04887db 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -18,6 +18,7 @@
#include <config.h>
+#include <unistd.h>
#include "testutils.h"
#include "vircommand.h"
diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c
index a9b02af7db..b7dfd64d06 100644
--- a/tests/virsystemdtest.c
+++ b/tests/virsystemdtest.c
@@ -24,6 +24,7 @@
# include <dbus/dbus.h>
# include <fcntl.h>
+# include <unistd.h>
# define LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW
# include "virsystemdpriv.h"
--
2.24.1