about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorDanny Wilson <danny@prime.vc>2015-11-07T03·51+0100
committerDanny Wilson <danny@prime.vc>2015-11-07T03·51+0100
commitcdb346c65eeb9f976cf3db21b3cb2f7d8837cf6b (patch)
tree386245c3d4acca4bbc88c805a1db25953c9eba2a /src/libutil/util.hh
parent5bc12454fd0ca07c26de197daaf0b52188d517b5 (diff)
Fix build on Solaris
d_type is not part of the POSIX spec unfortunately.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 0388388208..2edc5344fd 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -11,6 +11,12 @@
 
 #include <cstdio>
 
+#ifndef HAVE_STRUCT_DIRENT_D_TYPE
+#define DT_UNKNOWN 0
+#define DT_REG 1
+#define DT_LNK 2
+#define DT_DIR 3
+#endif
 
 namespace nix {