diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp index b63ab426bb080..31599f6152e92 100644 --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -2040,7 +2040,7 @@ TEST_F(FileSystemTest, SetLastAccessAndModificationTimeDirectory) { TEST_F(FileSystemTest, OpenDirectoryAsFileForRead) { std::string Buf(5, '?'); Expected FD = fs::openNativeFileForRead(TestDirectory); -#ifdef _WIN32 +#if defined(_WIN32) || defined(_AIX) || defined(__MVS__) EXPECT_EQ(errorToErrorCode(FD.takeError()), errc::is_a_directory); #else ASSERT_THAT_EXPECTED(FD, Succeeded());