]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/raw_syscalls.c
raw_syscalls: add lxc_raw_execveat()
[mirror_lxc.git] / src / lxc / raw_syscalls.c
1 #ifndef _GNU_SOURCE
2 #define _GNU_SOURCE 1
3 #endif
4 #include <errno.h>
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <sys/syscall.h>
8 #include <unistd.h>
9
10 #include "config.h"
11
12 int lxc_raw_execveat(int dirfd, const char *pathname, char *const argv[],
13 char *const envp[], int flags)
14 {
15 #ifdef __NR_execveat
16 syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
17 #else
18 errno = ENOSYS;
19 return -1;
20 #endif
21 }