]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: fix SYS_{unshare,nsenter} usage
authorKarel Zak <kzak@redhat.com>
Wed, 17 Apr 2013 14:58:00 +0000 (16:58 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 17 Apr 2013 14:58:00 +0000 (16:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/namespace.h
sys-utils/lscpu.c

index 9264302c66a81128e3c9bea7a63809f4e890bfb3..ea231cacbae29820f29ac9362d5d60622a5373d3 100644 (file)
 #  include <sys/syscall.h>
 # endif
 
-# ifndef HAVE_UNSHARE
+# if !defined(HAVE_UNSHARE) && defined(SYS_unshare)
 static inline int unshare(int flags)
 {
        return syscall(SYS_unshare, flags);
 }
 # endif
 
-# ifndef HAVE_SETNS
+# if !defined(HAVE_SETNS) && defined(SYS_setns)
 static inline int setns(int fd, int nstype)
 {
        return syscall(SYS_setns, fd, nstype);
index cd7be230a0e9f3d91845d8f6f9e6661e327315f3..2e08f66a9c7be03444d601754330c2fb67fbd011 100644 (file)
@@ -521,7 +521,7 @@ read_hypervisor_cpuid(struct lscpu_desc *desc)
 
 #else  /* ! __x86_64__ */
 static void
-read_hypervisor_cpuid(struct lscpu_desc *desc)
+read_hypervisor_cpuid(struct lscpu_desc *desc __attribute__((__unused__)))
 {
 }
 #endif