diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-08-12 10:53:06 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2022-08-15 15:03:37 +0000 |
commit | ae1a84f7313bdf4702492451714eacc78ee7745f (patch) | |
tree | cd3b2d38a28441b867f87a98205fe15d2e6c12db /lib/replace | |
parent | f7618dd31a9f8f6c0dbfdedd1a664eed25e2e449 (diff) | |
download | samba-ae1a84f7313bdf4702492451714eacc78ee7745f.tar.gz |
lib/replace: let DISABLE_OPATH also undef __NR_openat2
The reason for DISABLE_OPATH is to simulate a non-linux
system, so we should not use openat2() either.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'lib/replace')
-rw-r--r-- | lib/replace/replace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/replace/replace.c b/lib/replace/replace.c index 54d3a60e179..cbf372e494f 100644 --- a/lib/replace/replace.c +++ b/lib/replace/replace.c @@ -1104,6 +1104,14 @@ ssize_t rep_copy_file_range(int fd_in, # endif /* defined(LINUX) && defined(HAVE_SYS_SYSCALL_H) */ #endif /* !__NR_openat2 */ +#ifdef DISABLE_OPATH +/* + * systems without O_PATH also don't have openat2, + * so make sure we at a realistic combination. + */ +#undef __NR_openat2 +#endif /* DISABLE_OPATH */ + long rep_openat2(int dirfd, const char *pathname, struct open_how *how, size_t size) { |