From 984336448cedccc31a926e69c00d9220196de3e2 Mon Sep 17 00:00:00 2001 From: Samuel Crow Date: Thu, 12 Oct 2023 07:46:53 -0500 Subject: [PATCH] Improve POSIX compliance in CLI/FileUtils.cpp (#1064) Some POSIX platforms, such as Haiku and some BSDs, don't supply DT_* identifiers and the corresponding d_type field in stat. This fixes that and has been tested to still work on 64-bit Linux as well as 64-bit Haiku. --- CLI/FileUtils.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CLI/FileUtils.cpp b/CLI/FileUtils.cpp index 71e536c7..4ca657a9 100644 --- a/CLI/FileUtils.cpp +++ b/CLI/FileUtils.cpp @@ -165,11 +165,14 @@ static bool traverseDirectoryRec(const std::string& path, const std::function