about summary refs log tree commit diff homepage
path: root/runtime/POSIX/fd.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/POSIX/fd.h')
-rw-r--r--runtime/POSIX/fd.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/runtime/POSIX/fd.h b/runtime/POSIX/fd.h
index 4a6fbc15..4c07ac9a 100644
--- a/runtime/POSIX/fd.h
+++ b/runtime/POSIX/fd.h
@@ -10,14 +10,29 @@
 #ifndef __EXE_FD__
 #define __EXE_FD__
 
+#include "klee/Config/config.h"
+
 #ifndef _LARGEFILE64_SOURCE
 #error "_LARGEFILE64_SOURCE should be defined"
 #endif
+
+#include <dirent.h>
 #include <sys/types.h>
+
+#ifdef HAVE_SYSSTATFS_H
 #include <sys/statfs.h>
-#include <dirent.h>
+#endif
 
-typedef struct {  
+#if defined(__APPLE__)
+#include <sys/dtrace.h>
+#include <sys/mount.h>
+#include <sys/param.h>
+#if !defined(dirent64)
+#define dirent64 dirent
+#endif
+#endif
+
+typedef struct {
   unsigned size;  /* in bytes */
   char* contents;
   struct stat64* stat;