Skip to content

Commit 536e4bf

Browse files
kwyxzGhabry
authored andcommitted
Guard DT_UNKNOWN, DT_REG and DT_DIR. Fixes build on Haiku where these macros do not exist.
1 parent 7eeffa9 commit 536e4bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/platform.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
#include <cassert>
2222
#include <utility>
2323

24+
#ifndef DT_UNKNOWN
25+
#define DT_UNKNOWN 0
26+
#endif
27+
#ifndef DT_REG
28+
#define DT_REG DT_UNKNOWN
29+
#endif
30+
#ifndef DT_DIR
31+
#define DT_DIR DT_UNKNOWN
32+
#endif
33+
2434
Platform::File::File(std::string name) :
2535
#ifdef _WIN32
2636
filename(Utils::ToWideString(name))

0 commit comments

Comments
 (0)