summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2013-05-21 11:32:29 +0200
committerKarel Zak2013-05-21 11:32:29 +0200
commitbdd384d10d4991b7a7b3ae73c8527b18311f6ec4 (patch)
tree68f4282d1379f51c168490b6135db91069b14f99 /configure.ac
parentlscpu: add virtualization types (diff)
downloadkernel-qcow2-util-linux-bdd384d10d4991b7a7b3ae73c8527b18311f6ec4.tar.gz
kernel-qcow2-util-linux-bdd384d10d4991b7a7b3ae73c8527b18311f6ec4.tar.xz
kernel-qcow2-util-linux-bdd384d10d4991b7a7b3ae73c8527b18311f6ec4.zip
build-sys: always check for setns() and unshare() libs functions
$ ./configure --disable-unshare $ make nsenter CC sys-utils/nsenter.o In file included from sys-utils/nsenter.c:36:0: ./include/namespace.h:31:19: error: static declaration of ‘unshare’ follows non-static declaration In file included from /usr/include/sched.h:42:0, from sys-utils/nsenter.c:23: /usr/include/bits/sched.h:86:12: note: previous declaration of ‘unshare’ was here make: *** [sys-utils/nsenter.o] Error 1 We have to always check for the libc function independently on --disable-{unshare,nsenter} to avoid collision between local and libc declarations. Reported-by: "Gabor Z. Papp" <gzp@papp.hu> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 2 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index dad0439a3..9414e6ac4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -905,9 +905,7 @@ UL_BUILD_INIT([unshare])
UL_REQUIRES_LINUX([unshare])
UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
-if test "x$build_unshare" = xyes; then
- AC_CHECK_FUNCS([unshare])
-fi
+AC_CHECK_FUNCS([unshare])
AC_ARG_ENABLE([nsenter],
AS_HELP_STRING([--disable-nsenter], [do not build nsenter]),
@@ -917,9 +915,7 @@ UL_BUILD_INIT([nsenter])
UL_REQUIRES_LINUX([nsenter])
UL_REQUIRES_SYSCALL_CHECK([nsenter], [UL_CHECK_SYSCALL([setns])], [setns])
AM_CONDITIONAL(BUILD_NSENTER, test "x$build_nsenter" = xyes)
-if test "x$build_nsenter" = xyes; then
- AC_CHECK_FUNCS([setns])
-fi
+AC_CHECK_FUNCS([setns])
dnl setpriv depends on libcap-ng. It would be possible to build
dnl a version of setpriv with limited functionality without libcap-ng,