chase: Use openat2() if available

Let's make use of openat2() if we can in chaseat().
This commit is contained in:
Daan De Meyer
2026-05-12 14:43:39 +02:00
committed by Daan De Meyer
parent 452214c09b
commit 8b81e3b751
5 changed files with 123 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <fcntl.h>
#include <sys/syscall.h>
#include <unistd.h>
#if !HAVE_OPENAT2
int missing_openat2(int dfd, const char *filename, const struct open_how *how, size_t usize) {
return syscall(__NR_openat2, dfd, filename, how, usize);
}
#endif
+1
View File
@@ -2,6 +2,7 @@
libc_wrapper_sources = files(
'bpf.c',
'fcntl.c',
'ioprio.c',
'kcmp.c',
'kexec.c',