fexecve: remove unnecessary #ifdef

parent 27bc4707
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
#include "config.h" #include "config.h"
static int lxc_raw_execveat(int dirfd, const char *pathname, char *const argv[], static inline int lxc_raw_execveat(int dirfd, const char *pathname,
char *const envp[], int flags) char *const argv[], char *const envp[],
int flags)
{ {
#ifdef __NR_execveat #ifdef __NR_execveat
syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
...@@ -51,11 +52,9 @@ int efexecve(int fd, char *const argv[], char *const envp[]) ...@@ -51,11 +52,9 @@ int efexecve(int fd, char *const argv[], char *const envp[])
return -1; return -1;
} }
#ifdef __NR_execveat
lxc_raw_execveat(fd, "", argv, envp, AT_EMPTY_PATH); lxc_raw_execveat(fd, "", argv, envp, AT_EMPTY_PATH);
if (errno != ENOSYS) if (errno != ENOSYS)
return -1; return -1;
#endif
ret = snprintf(procfd, sizeof(procfd), "/proc/self/fd/%d", fd); ret = snprintf(procfd, sizeof(procfd), "/proc/self/fd/%d", fd);
if (ret < 0 || (size_t)ret >= sizeof(procfd)) { if (ret < 0 || (size_t)ret >= sizeof(procfd)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment