From 1b445cada51e247116ef934c3394bcc6f22589f7 Mon Sep 17 00:00:00 2001 From: Muiez Ahmed Date: Fri, 16 Sep 2022 10:22:21 -0400 Subject: [SystemZ][z/OS] define REMOVE_ALL_USE_DIRECTORY_ITERATOR (libc++) This patch fixes the z/OS build by using the first implementation of __remove_all since we don't have access to the openat() family of POSIX functions. Differential Revision: https://reviews.llvm.org/D132948 --- libcxx/src/filesystem/operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/src/filesystem/operations.cpp') diff --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp index 7467abb..61c643cb 100644 --- a/libcxx/src/filesystem/operations.cpp +++ b/libcxx/src/filesystem/operations.cpp @@ -1348,7 +1348,7 @@ bool __remove(const path& p, error_code* ec) { // // The second implementation is used on platforms where `openat()` & friends are available, // and it threads file descriptors through recursive calls to avoid such race conditions. -#if defined(_LIBCPP_WIN32API) +#if defined(_LIBCPP_WIN32API) || defined (__MVS__) # define REMOVE_ALL_USE_DIRECTORY_ITERATOR #endif -- cgit v1.1