This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed
Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1717#include "util.h"
1818#include "hyper.h"
1919#include "parse.h"
20+ #include "syscall.h"
2021
2122static int container_setup_volume (struct hyper_container * container )
2223{
Original file line number Diff line number Diff line change 1212#include <signal.h>
1313#include <fcntl.h>
1414#include <inttypes.h>
15- #include "syscall.h"
1615
1716#include "hyper.h"
1817#include "util.h"
1918#include "parse.h"
19+ #include "syscall.h"
2020
2121static void pts_hup (struct hyper_event * de , int efd , int out )
2222{
Original file line number Diff line number Diff line change 2727#include "event.h"
2828#include "parse.h"
2929#include "container.h"
30+ #include "syscall.h"
3031
3132struct hyper_pod global_pod = {
3233 .containers = LIST_HEAD_INIT (global_pod .containers ),
Original file line number Diff line number Diff line change 1+ #define _GNU_SOURCE
2+ #include <unistd.h>
3+ #include <sys/syscall.h>
4+
5+ /*
6+ * Use raw syscall for versions of glibc that don't include it. But this
7+ * requires kernel-headers for syscall number hint.
8+ */
9+
10+ #if !defined SYS_setns && defined __NR_setns
11+ static inline int setns (int fd , int nstype )
12+ {
13+ errno = syscall (__NR_setns , fd , nstype );
14+ return errno == 0 ? 0 : -1 ;
15+ }
16+ #endif
You can’t perform that action at this time.
0 commit comments