| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
#include <sys/syscall.h> |
| 4 |
#include <unistd.h> |
| 5 |
|
| 6 |
int missing_close_range(unsigned first_fd, unsigned end_fd, unsigned flags) { |
| 7 |
/* Kernel-side the syscall expects fds as unsigned integers (just like close() actually), while |
| 8 |
* userspace exclusively uses signed integers for fds. glibc chose to expose it 1:1 however, hence we |
| 9 |
* do so here too, even if we end up passing signed fds to it most of the time. */ |
| 10 |
return syscall(__NR_close_range, first_fd, end_fd, flags); |
| 11 |
} |
| 12 |
|
| 13 |
int missing_execveat(int dirfd, const char *pathname, char * const argv[], char * const envp[], int flags) { |
| 14 |
return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); |
| 15 |
} |