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>
# 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)
{