]>
Commit | Line | Data |
---|---|---|
1f2f436a A |
1 | --- readdir.c.orig 2009-11-08 13:59:03.000000000 -0800 |
2 | +++ readdir.c 2009-11-08 13:59:22.000000000 -0800 | |
3 | @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/rea | |
224c7076 A |
4 | #include <errno.h> |
5 | #include <string.h> | |
6 | #include <pthread.h> | |
7 | +#include <unistd.h> | |
8 | #include "un-namespace.h" | |
9 | ||
224c7076 | 10 | #include "libc_private.h" |
1f2f436a | 11 | @@ -61,8 +62,13 @@ _readdir_unlocked(dirp, skip) |
224c7076 A |
12 | dirp->dd_loc = 0; |
13 | } | |
14 | if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) { | |
15 | +#if __DARWIN_64_BIT_INO_T | |
16 | + dirp->dd_size = __getdirentries64(dirp->dd_fd, | |
17 | + dirp->dd_buf, dirp->dd_len, &dirp->dd_td->seekoff); | |
18 | +#else /* !__DARWIN_64_BIT_INO_T */ | |
19 | dirp->dd_size = _getdirentries(dirp->dd_fd, | |
20 | dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); | |
21 | +#endif /* __DARWIN_64_BIT_INO_T */ | |
22 | if (dirp->dd_size <= 0) | |
23 | return (NULL); | |
24 | } |