From 536e4bfc6188a1e1678fc634d4979cea5246c6fe Mon Sep 17 00:00:00 2001 From: kwyxz Date: Tue, 29 Sep 2020 19:02:04 +0000 Subject: [PATCH] Guard DT_UNKNOWN, DT_REG and DT_DIR. Fixes build on Haiku where these macros do not exist. --- src/platform.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/platform.cpp b/src/platform.cpp index 181058caa3..0c105b809b 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -21,6 +21,16 @@ #include #include +#ifndef DT_UNKNOWN +#define DT_UNKNOWN 0 +#endif +#ifndef DT_REG +#define DT_REG DT_UNKNOWN +#endif +#ifndef DT_DIR +#define DT_DIR DT_UNKNOWN +#endif + Platform::File::File(std::string name) : #ifdef _WIN32 filename(Utils::ToWideString(name))