Commit 1ff6b16e authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by Stephen Hemminger

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 <vadim4j@gmail.com>
Fixes: eb67e449 ("lib: Add netns_switch func for change network namespace")
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
parent ffff6931
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment