提交 a5e16020 编写于 作者: P Peter Krempa

Include unistd.h directly by files using it

util/virutil.h bogously included unistd.h. Drop it and replace it by
including it directly where needed.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 285c5f28
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "viralloc.h" #include "viralloc.h"
#include "virerror.h" #include "virerror.h"
#include "virstring.h" #include "virstring.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <config.h> #include <config.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include "libxl_domain.h" #include "libxl_domain.h"
#include "libxl_capabilities.h" #include "libxl_capabilities.h"
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "lock_daemon_config.h" #include "lock_daemon_config.h"
#include "virconf.h" #include "virconf.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "lock_driver.h" #include "lock_driver.h"
#include "virconf.h" #include "virconf.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "log_daemon_config.h" #include "log_daemon_config.h"
#include "virconf.h" #include "virconf.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
/* includes */ /* includes */
#include <config.h> #include <config.h>
#include "unistd.h"
#include "lxc_conf.h" #include "lxc_conf.h"
#include "lxc_domain.h" #include "lxc_domain.h"
#include "virerror.h" #include "virerror.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <mntent.h> #include <mntent.h>
#include <unistd.h>
#include "lxc_fuse.h" #include "lxc_fuse.h"
#include "lxc_cgroup.h" #include "lxc_cgroup.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "virthread.h" #include "virthread.h"
#include "virfile.h" #include "virfile.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include <unistd.h>
#include "internal.h" #include "internal.h"
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#endif #endif
#include <sys/time.h> #include <sys/time.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#if defined(HAVE_SYS_MOUNT_H) #if defined(HAVE_SYS_MOUNT_H)
# include <sys/mount.h> # include <sys/mount.h>
#endif #endif
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "remote_daemon_config.h" #include "remote_daemon_config.h"
#include "virconf.h" #include "virconf.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#ifdef __FreeBSD__ #ifdef __FreeBSD__
# include <sys/sysctl.h> # include <sys/sysctl.h>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include "security_driver.h" #include "security_driver.h"
#include "security_stack.h" #include "security_stack.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include "virerror.h" #include "virerror.h"
#include "storage_file_fs.h" #include "storage_file_fs.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <config.h> #include <config.h>
#ifdef __linux__ #ifdef __linux__
# include <unistd.h>
# include <mntent.h> # include <mntent.h>
# include <sys/stat.h> # include <sys/stat.h>
# include <sys/mount.h> # include <sys/mount.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <config.h> #include <config.h>
#ifdef __linux__ #ifdef __linux__
# include <unistd.h>
# include <mntent.h> # include <mntent.h>
# include <sys/mount.h> # include <sys/mount.h>
#endif /* __linux__ */ #endif /* __linux__ */
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <net/if.h> #include <net/if.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#ifdef __linux__ #ifdef __linux__
# include <linux/sockios.h> # include <linux/sockios.h>
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <net/if.h> #include <net/if.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#ifdef __linux__ #ifdef __linux__
# include <linux/sockios.h> # include <linux/sockios.h>
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "virnetdevmacvlan.h" #include "virnetdevmacvlan.h"
#include "virmacaddr.h" #include "virmacaddr.h"
#include "virerror.h" #include "virerror.h"
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "virnetdevvportprofile.h" #include "virnetdevvportprofile.h"
#include "virerror.h" #include "virerror.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
#include <config.h> #include <config.h>
#include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if defined HAVE_SYS_SYSCALL_H #if defined HAVE_SYS_SYSCALL_H
# include <sys/syscall.h> # include <sys/syscall.h>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <signal.h> #include <signal.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include "virpidfile.h" #include "virpidfile.h"
#include "virfile.h" #include "virfile.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <config.h> #include <config.h>
#include <poll.h> #include <poll.h>
#include <unistd.h>
#include "virpolkit.h" #include "virpolkit.h"
#include "virerror.h" #include "virerror.h"
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#define LIBVIRT_VIRRESCTRLPRIV_H_ALLOW #define LIBVIRT_VIRRESCTRLPRIV_H_ALLOW
#include "virresctrlpriv.h" #include "virresctrlpriv.h"
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
# define LIBVIRT_VIRUTIL_H # define LIBVIRT_VIRUTIL_H
# include "internal.h" # include "internal.h"
# include <unistd.h>
# include <sys/types.h> # include <sys/types.h>
# ifndef MIN # ifndef MIN
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <signal.h> #include <signal.h>
#include <time.h> #include <time.h>
#include <unistd.h>
#if HAVE_MACH_CLOCK_ROUTINES #if HAVE_MACH_CLOCK_ROUTINES
# include <mach/clock.h> # include <mach/clock.h>
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virerror.h" #include "virerror.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# include <fcntl.h> # include <fcntl.h>
# include <sys/stat.h> # include <sys/stat.h>
# include <unistd.h>
# include "virstring.h" # include "virstring.h"
# include "virerror.h" # include "virerror.h"
# include "virlog.h" # include "virlog.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifdef WITH_VBOX #ifdef WITH_VBOX
# include <regex.h> # include <regex.h>
# include <unistd.h>
# include "vbox/vbox_snapshot_conf.h" # include "vbox/vbox_snapshot_conf.h"
# define VIR_FROM_THIS VIR_FROM_NONE # define VIR_FROM_THIS VIR_FROM_NONE
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <config.h> #include <config.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virfile.h" #include "virfile.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#ifndef WIN32 #ifndef WIN32
# include <fcntl.h> # include <fcntl.h>
# include <unistd.h>
# include "viralloc.h" # include "viralloc.h"
# include "virfile.h" # include "virfile.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <signal.h> #include <signal.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virutil.h" #include "virutil.h"
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virerror.h" #include "virerror.h"
#include "rpc/virnetdaemon.h" #include "rpc/virnetdaemon.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# include <ifaddrs.h> # include <ifaddrs.h>
#endif #endif
#include <netdb.h> #include <netdb.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virutil.h" #include "virutil.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virnettlshelpers.h" #include "virnettlshelpers.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <unistd.h>
#include "virnettlshelpers.h" #include "virnettlshelpers.h"
#include "viralloc.h" #include "viralloc.h"
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "virnettlshelpers.h" #include "virnettlshelpers.h"
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "virscsi.h" #include "virscsi.h"
#include "testutils.h" #include "testutils.h"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <config.h> #include <config.h>
#include <unistd.h>
#include "testutils.h" #include "testutils.h"
#include "vircommand.h" #include "vircommand.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册