about summary refs log tree commit diff homepage
path: root/runtime/POSIX
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2018-10-03 22:23:49 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-10-08 16:12:29 +0100
commitf3d3cca63d1e2500764279f7b4fc302fd8106676 (patch)
treeff3997a39bda7a15122ccb102f773066532413cc /runtime/POSIX
parentdc6cba8a1524fdad87660c780c9c12dcb0b38b24 (diff)
downloadklee-f3d3cca63d1e2500764279f7b4fc302fd8106676.tar.gz
add support for klee-replay on OSX
* also adds klee-replay as dependency for systemtests
Diffstat (limited to 'runtime/POSIX')
-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;