summaryrefslogtreecommitdiff
path: root/support/support_enter_network_namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/support_enter_network_namespace.c')
-rw-r--r--support/support_enter_network_namespace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/support/support_enter_network_namespace.c b/support/support_enter_network_namespace.c
index d2e78fe560..28b0ee29cf 100644
--- a/support/support_enter_network_namespace.c
+++ b/support/support_enter_network_namespace.c
@@ -23,9 +23,10 @@
#include <stdio.h>
#include <string.h>
#include <support/check.h>
+#include <support/xsocket.h>
+#include <support/xunistd.h>
#include <sys/ioctl.h>
#include <unistd.h>
-#include <xsocket.h>
static bool in_uts_namespace;
@@ -58,7 +59,7 @@ support_enter_network_namespace (void)
req.ifr_flags |= IFF_UP | IFF_RUNNING;
TEST_VERIFY_EXIT (ioctl (fd, SIOCSIFFLAGS, &req) == 0);
}
- close (fd);
+ xclose (fd);
return !already_up;
}