[PATCH 1/3] sysconf: Include unistd.h

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

 



The manpage for sysconf() suggest including unistd.h as the
function is declared there. Even though we are not hitting any
compile issues currently, let's include the correct header file
instead of relying on some hidden include chain.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/nodeinfo.c           | 1 +
 src/qemu/qemu_conf.h     | 2 ++
 src/util/vircgroup.c     | 1 +
 src/util/vircommand.c    | 1 +
 tools/virt-login-shell.c | 1 +
 5 files changed, 6 insertions(+)

diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 6ccada5..77ea155 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -33,6 +33,7 @@
 #include "conf/domain_conf.h"
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#include <unistd.h>
 
 #if HAVE_LINUX_KVM_H
 # include <linux/kvm.h>
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 4b33770..a714b84 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -24,6 +24,8 @@
 #ifndef __QEMUD_CONF_H
 # define __QEMUD_CONF_H
 
+# include <unistd.h>
+
 # include "virebtables.h"
 # include "internal.h"
 # include "capabilities.h"
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index a07f3c2..e39c4d1 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -38,6 +38,7 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <dirent.h>
+#include <unistd.h>
 
 #define __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__
 #include "vircgrouppriv.h"
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 1993bc6..fe7bf34 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -29,6 +29,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #if WITH_CAPNG
 # include <cap-ng.h>
diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c
index ceb271d..ec759dc 100644
--- a/tools/virt-login-shell.c
+++ b/tools/virt-login-shell.c
@@ -29,6 +29,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "internal.h"
 #include "virerror.h"
-- 
2.4.10

--
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]