diff options
author | Karel Zak | 2013-03-20 14:40:19 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-20 14:40:19 +0100 |
commit | 5ad0923904b60b41684728e2cc9a44e96b3eb0cd (patch) | |
tree | 6c8dddc5e88b0cad4d2f0c3e08568ba7efca9ece | |
parent | docs: add AVAILABILITY section to isosize man page, and tweak wording (diff) | |
download | kernel-qcow2-util-linux-5ad0923904b60b41684728e2cc9a44e96b3eb0cd.tar.gz kernel-qcow2-util-linux-5ad0923904b60b41684728e2cc9a44e96b3eb0cd.tar.xz kernel-qcow2-util-linux-5ad0923904b60b41684728e2cc9a44e96b3eb0cd.zip |
remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | include/namespace.h | 6 | ||||
-rw-r--r-- | login-utils/sulogin-consoles.c | 12 | ||||
-rw-r--r-- | term-utils/agetty.c | 1 |
3 files changed, 8 insertions, 11 deletions
diff --git a/include/namespace.h b/include/namespace.h index 9d58f13a5..9264302c6 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -23,8 +23,11 @@ # define CLONE_NEWPID 0x20000000 # endif -# ifndef HAVE_UNSHARE +# if !defined(HAVE_UNSHARE) || !defined(HAVE_SETNS) # include <sys/syscall.h> +# endif + +# ifndef HAVE_UNSHARE static inline int unshare(int flags) { return syscall(SYS_unshare, flags); @@ -32,7 +35,6 @@ static inline int unshare(int flags) # endif # ifndef HAVE_SETNS -# include <sys/syscall.h> static inline int setns(int fd, int nstype) { return syscall(SYS_setns, fd, nstype); diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index b519f7f25..305d1e7dc 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -31,9 +31,10 @@ #include <sys/stat.h> #include <sys/ioctl.h> #ifdef __linux__ -# include <sys/vt.h> -# include <sys/kd.h> -# include <linux/serial.h> +# include <sys/vt.h> +# include <sys/kd.h> +# include <linux/serial.h> +# include <linux/major.h> #endif #include <fcntl.h> #include <dirent.h> @@ -43,7 +44,6 @@ # include <sys/mount.h> # include <linux/fs.h> # include <linux/magic.h> -# include <linux/major.h> # ifndef MNT_DETACH # define MNT_DETACH 2 # endif @@ -53,10 +53,6 @@ #include "canonicalize.h" #include "sulogin-consoles.h" -#ifdef __linux__ -# include <linux/major.h> -#endif - #if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) # ifndef typeof # define typeof __typeof__ diff --git a/term-utils/agetty.c b/term-utils/agetty.c index b9a14b328..3c6307a21 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -28,7 +28,6 @@ #include <time.h> #include <sys/file.h> #include <sys/socket.h> -#include <netdb.h> #include <langinfo.h> #include <grp.h> #include <arpa/inet.h> |