mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-25 08:35:52 +00:00
Merge pull request #32 from wcwxyz/master
define setns syscall wrapper to fix build issue
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "util.h"
|
||||
#include "hyper.h"
|
||||
#include "parse.h"
|
||||
#include "syscall.h"
|
||||
|
||||
static int container_setup_volume(struct hyper_container *container)
|
||||
{
|
||||
|
||||
+1
-1
@@ -12,11 +12,11 @@
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include "syscall.h"
|
||||
|
||||
#include "hyper.h"
|
||||
#include "util.h"
|
||||
#include "parse.h"
|
||||
#include "syscall.h"
|
||||
|
||||
static void pts_hup(struct hyper_event *de, int efd, int out)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "event.h"
|
||||
#include "parse.h"
|
||||
#include "container.h"
|
||||
#include "syscall.h"
|
||||
|
||||
struct hyper_pod global_pod = {
|
||||
.containers = LIST_HEAD_INIT(global_pod.containers),
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
/*
|
||||
* Use raw syscall for versions of glibc that don't include it. But this
|
||||
* requires kernel-headers for syscall number hint.
|
||||
*/
|
||||
|
||||
#if !defined SYS_setns && defined __NR_setns
|
||||
static inline int setns(int fd, int nstype)
|
||||
{
|
||||
errno = syscall(__NR_setns, fd, nstype);
|
||||
return errno == 0 ? 0 : -1;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user