]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fexecve: remove unnecessary #ifdef
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 12 Feb 2019 00:52:10 +0000 (01:52 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 12 Feb 2019 00:52:10 +0000 (01:52 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/include/fexecve.c

index 21ccfe87795b3488f51a277cda6307ffcc176aa9..b4c0fe900857819994d59b08118e2c5cab843172 100644 (file)
@@ -30,8 +30,9 @@
 
 #include "config.h"
 
-static int lxc_raw_execveat(int dirfd, const char *pathname, char *const argv[],
-                           char *const envp[], int flags)
+static inline int lxc_raw_execveat(int dirfd, const char *pathname,
+                                  char *const argv[], char *const envp[],
+                                  int flags)
 {
 #ifdef __NR_execveat
        syscall(__NR_execveat, dirfd, pathname, argv, envp, flags);
@@ -51,11 +52,9 @@ int efexecve(int fd, char *const argv[], char *const envp[])
                return -1;
        }
 
-#ifdef __NR_execveat
        lxc_raw_execveat(fd, "", argv, envp, AT_EMPTY_PATH);
        if (errno != ENOSYS)
                return -1;
-#endif
 
        ret = snprintf(procfd, sizeof(procfd), "/proc/self/fd/%d", fd);
        if (ret < 0 || (size_t)ret >= sizeof(procfd)) {