]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
remove duplicate includes
authorKarel Zak <kzak@redhat.com>
Wed, 20 Mar 2013 13:40:19 +0000 (14:40 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Mar 2013 13:40:19 +0000 (14:40 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/namespace.h
login-utils/sulogin-consoles.c
term-utils/agetty.c

index 9d58f13a5117cadd64122479a1d17a5ea340f90c..9264302c66a81128e3c9bea7a63809f4e890bfb3 100644 (file)
 #  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);
index b519f7f250ca92c986f12e49c2b94fc5979fff44..305d1e7dccde33f8c59516fd5af7a0e9c06248b7 100644 (file)
 #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
 #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__
index b9a14b3285121f33caa610b57c0f0e630200a7b4..3c6307a216ff8cc7182ff866a6c191c8ed46074e 100644 (file)
@@ -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>