# define __lstat64 lstat
# define __closedir closedir
# define __opendir opendir
-# define __readdir readdir
+# define __readdir64 readdir
# define __fdopendir fdopendir
# define __openat openat
# define __rewinddir rewinddir
# define __openat64 openat
+# define dirent64 dirent
#else
# include <not-cancel.h>
#endif
while (!(thisdev == rootdev && thisino == rootino))
{
- struct dirent *d;
+ struct dirent64 *d;
dev_t dotdev;
ino_t dotino;
bool mount_point;
/* Clear errno to distinguish EOF from error if readdir returns
NULL. */
__set_errno (0);
- d = __readdir (dirstream);
+ d = __readdir64 (dirstream);
/* When we've iterated through all directory entries without finding
one with a matching d_ino, rewind the stream and consider each
{
use_d_ino = false;
__rewinddir (dirstream);
- d = __readdir (dirstream);
+ d = __readdir64 (dirstream);
}
if (d == NULL)
/* The compat code expects the 'struct direct' with d_ino being a __ino_t
instead of __ino64_t. */
# include <shlib-compat.h>
+# if IS_IN(rtld)
+weak_alias (__readdir64, readdir64)
+# else
versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2);
+# endif
# if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
# include <olddirent.h>
# define __READDIR attribute_compat_text_section __old_readdir64