From: Karel Zak Date: Wed, 17 Apr 2013 14:58:00 +0000 (+0200) Subject: include: fix SYS_{unshare,nsenter} usage X-Git-Tag: v2.23~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d791b4cc04ee2a7cf006dee1109ae39292b3d96;p=thirdparty%2Futil-linux.git include: fix SYS_{unshare,nsenter} usage Signed-off-by: Karel Zak --- diff --git a/include/namespace.h b/include/namespace.h index 9264302c66..ea231cacba 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -27,14 +27,14 @@ # include # 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); diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index cd7be230a0..2e08f66a9c 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -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