7 typedef char dirstream_buf_alignment_check
[1-2*(int)(
8 offsetof(struct __dirstream
, buf
) % sizeof(off_t
))];
10 struct dirent
*readdir(DIR *dir
)
14 if (dir
->buf_pos
>= dir
->buf_end
) {
15 int len
= __syscall(SYS_getdents
, dir
->fd
, dir
->buf
, sizeof dir
->buf
);
17 if (len
< 0 && len
!= -ENOENT
) errno
= -len
;
23 de
= (void *)(dir
->buf
+ dir
->buf_pos
);
24 dir
->buf_pos
+= de
->d_reclen
;
25 dir
->tell
= de
->d_off
;
29 weak_alias(readdir
, readdir64
);