about summary refs log tree commit diff homepage
path: root/runtime/POSIX/fd_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/POSIX/fd_64.c')
-rw-r--r--runtime/POSIX/fd_64.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/POSIX/fd_64.c b/runtime/POSIX/fd_64.c
index d0710caf..c84599ff 100644
--- a/runtime/POSIX/fd_64.c
+++ b/runtime/POSIX/fd_64.c
@@ -7,6 +7,15 @@
 //
 //===----------------------------------------------------------------------===//
 
+#if __GNUC__
+#if __x86_64__ || __ppc64__
+#define ENV64
+#else
+#define ENV32
+#endif
+#endif
+
+#ifdef ENV64
 #define _LARGEFILE64_SOURCE
 #define _FILE_OFFSET_BITS 64
 #include "fd.h"
@@ -88,3 +97,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