From ae1a84f7313bdf4702492451714eacc78ee7745f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 12 Aug 2022 10:53:06 +0200 Subject: 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 Reviewed-by: Volker Lendecke --- lib/replace/replace.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/replace') 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) { -- cgit v1.2.1