summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/dirstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/dirent/dirstream.h')
-rw-r--r--libc/misc/dirent/dirstream.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/libc/misc/dirent/dirstream.h b/libc/misc/dirent/dirstream.h
index 8131ffce7..dc5c5732a 100644
--- a/libc/misc/dirent/dirstream.h
+++ b/libc/misc/dirent/dirstream.h
@@ -24,12 +24,23 @@ Cambridge, MA 02139, USA. */
#define _DIRSTREAM_H 1
+#include <features.h>
#include <sys/types.h>
-#include <dirent.h>
#ifdef _POSIX_THREADS
#include <pthread.h>
#endif
+
+#ifdef __UCLIBC_HAVE_LFS__
+#ifndef __USE_LARGEFILE64
+# define __USE_LARGEFILE64
+#endif
+# define stuff_t __off64_t
+#else
+# define stuff_t __off_t
+#endif
+
+
/* For now, syscall readdir () only supports one entry at a time. It
* will be changed in the future.
#define NUMENT 3
@@ -48,19 +59,19 @@ struct __dirstream {
int dd_fd;
/* offset of the next dir entry in buffer */
- off_t dd_nextloc;
+ stuff_t dd_nextloc;
/* bytes of valid entries in buffer */
- size_t dd_size;
+ stuff_t dd_size;
/* -> directory buffer */
void *dd_buf;
/* offset of the next dir entry in directory. */
- off_t dd_nextoff;
+ stuff_t dd_nextoff;
/* total size of buffer */
- size_t dd_max;
+ stuff_t dd_max;
enum {unknown, have_getdents, no_getdents} dd_getdents;