Message ID | 1421318185-10858-2-git-send-email-nicolas.dichtel@6wind.com |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
diff --git a/include/namespace.h b/include/namespace.h index 28a4223b3eb2..52f7fbd7bb8c 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -3,6 +3,7 @@ #include <sched.h> #include <sys/mount.h> +#include <sys/syscall.h> #include <errno.h> #define NETNS_RUN_DIR "/var/run/netns"
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 <vadim4j@gmail.com> Fixes: eb67e4498aec ("lib: Add netns_switch func for change network namespace") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> --- include/namespace.h | 1 + 1 file changed, 1 insertion(+)