]> git.ipfire.org Git - thirdparty/iproute2.git/commit
iproute2: Auto-detect the presence of setns in libc
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 15 Jul 2011 14:26:59 +0000 (14:26 +0000)
committerStephen Hemminger <shemminger@vyatta.com>
Wed, 31 Aug 2011 18:02:02 +0000 (11:02 -0700)
commit2e8a07f543e6f48f0d0479e3dd4796c18f733e12
tree14cdb3de964d02948aba6541f0c03fcacca4f63a
parent0f28c38b34fbfe97a3f0e84871d6dde737b597a9
iproute2: Auto-detect the presence of setns in libc

If libc has setns present use that version instead of
rolling the syscall wrapper by hand.

Dan McGee found the following compile error:

    gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
    -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\"   -c -o ipnetns.o ipnetns.c
    ipnetns.c:31:12: error: static declaration of ‘setns’ follows non-static
    declaration
    /usr/include/bits/sched.h:93:12: note: previous declaration of ‘setns’
    was here
    make[1]: *** [ipnetns.o] Error 1

Reported-by: Dan McGee <dan@archlinux.org>
Tested-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
configure
ip/Makefile
ip/ipnetns.c