From 1ff6b16e2d5b291fd3cc5405c492d9b27d596d0a Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel Date: Thu, 15 Jan 2015 11:36:25 +0100 Subject: [PATCH] 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 --- include/namespace.h | 1 + 1 file changed, 1 insertion(+) 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" -- 2.47.3