From: Nicolas Dichtel Date: Thu, 15 Jan 2015 10:36:25 +0000 (+0100) Subject: lib: fix setns() function when !HAVE_SETNS X-Git-Tag: v3.19.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ff6b16e2d5b291fd3cc5405c492d9b27d596d0a;p=thirdparty%2Fiproute2.git lib: fix setns() function when !HAVE_SETNS When HAVE_SETNS is not set, iproute2 provides a local implementation of this function based on __NR_setns. This macro is defined in sys/syscall.h, which was not included, thus the local implementation always returned -1. CC: Vadim Kochan Fixes: eb67e4498aec ("lib: Add netns_switch func for change network namespace") Signed-off-by: Nicolas Dichtel --- diff --git a/include/namespace.h b/include/namespace.h index 28a4223b3..52f7fbd7b 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -3,6 +3,7 @@ #include #include +#include #include #define NETNS_RUN_DIR "/var/run/netns"