[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
NOKEYCHECK=True
GitOrigin-RevId: 1b445cada51e247116ef934c3394bcc6f22589f7
diff --git a/src/filesystem/operations.cpp b/src/filesystem/operations.cpp
index 7467abb..61c643c 100644
--- a/src/filesystem/operations.cpp
+++ b/src/filesystem/operations.cpp
@@ -1348,7 +1348,7 @@
//
// 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