summaryrefslogtreecommitdiff
path: root/lib/common/BoxPlatform.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r--lib/common/BoxPlatform.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h
index 4b58d31d..a3d0e7ad 100644
--- a/lib/common/BoxPlatform.h
+++ b/lib/common/BoxPlatform.h
@@ -165,4 +165,12 @@
#include "emu.h"
#endif
+// Solaris has no dirfd(x) macro or function, and we need one.
+// We cannot define macros with arguments directly using AC_DEFINE,
+// so do it here instead of in configure.ac.
+
+#ifndef HAVE_DECL_DIRFD
+ #define dirfd(x) (x)->d_fd
+#endif
+
#endif // BOXPLATFORM__H