about summary refs log tree commit diff homepage
path: root/runtime/POSIX/fd_64.c
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2013-09-21 03:53:42 -0700
committerCristian Cadar <c.cadar@imperial.ac.uk>2013-09-21 03:53:42 -0700
commit95521073b1a6c0eec2719a4c355c83506b325693 (patch)
tree55d77a515985663189acfa1094e4ae1e62013c0b /runtime/POSIX/fd_64.c
parentb913be09fa192d587e3006d83ad2f5d0e69f7e20 (diff)
parente9b814eda7a590af35959cd11ceeb7bef7496789 (diff)
downloadklee-95521073b1a6c0eec2719a4c355c83506b325693.tar.gz
Merge pull request #17 from MartinNowack/LLVM33
Make KLEE compile with LLVM 2.3.
Diffstat (limited to 'runtime/POSIX/fd_64.c')
-rw-r--r--runtime/POSIX/fd_64.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/POSIX/fd_64.c b/runtime/POSIX/fd_64.c
index d0710caf..268579c0 100644
--- a/runtime/POSIX/fd_64.c
+++ b/runtime/POSIX/fd_64.c
@@ -7,6 +7,17 @@
 //
 //===----------------------------------------------------------------------===//
 
+#if __GNUC__
+#if __x86_64__ || __ppc64__
+#define ENV64
+#else
+#define ENV32
+#endif
+#endif
+
+
+#include "klee/Config/Version.h"
+#if defined(ENV64) || (LLVM_VERSION_CODE < LLVM_VERSION(3, 3))
 #define _LARGEFILE64_SOURCE
 #define _FILE_OFFSET_BITS 64
 #include "fd.h"
@@ -88,3 +99,5 @@ int getdents64(unsigned int fd, struct dirent *dirp, unsigned int count) {
 }
 int __getdents64(unsigned int fd, struct dirent *dirp, unsigned int count)
      __attribute__((alias("getdents64")));
+
+#endif