mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
getdents64 fallback d_type support
This commit is contained in:
parent
09fad1a611
commit
1ac7a2c7b4
@ -1,3 +1,9 @@
|
|||||||
|
2010-09-15 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): When
|
||||||
|
implementing getdents64 using getdents syscall, set d_type if
|
||||||
|
__ASSUME_GETDENTS32_D_TYPE.
|
||||||
|
|
||||||
2010-09-16 Andreas Schwab <schwab@redhat.com>
|
2010-09-16 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
* elf/dl-close.c (free_slotinfo, free_mem): Move to...
|
* elf/dl-close.c (free_slotinfo, free_mem): Move to...
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007
|
/* Copyright (C) 1993, 1995-2004, 2006, 2007, 2010
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
@ -285,7 +285,11 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
|
|||||||
DIRENT_SET_DP_INO(dp, kdp->d_ino);
|
DIRENT_SET_DP_INO(dp, kdp->d_ino);
|
||||||
dp->d_off = kdp->d_off;
|
dp->d_off = kdp->d_off;
|
||||||
dp->d_reclen = new_reclen;
|
dp->d_reclen = new_reclen;
|
||||||
|
#ifdef __ASSUME_GETDENTS32_D_TYPE
|
||||||
|
dp->d_type = *((char *) kdp + kdp->d_reclen - 1);
|
||||||
|
#else
|
||||||
dp->d_type = DT_UNKNOWN;
|
dp->d_type = DT_UNKNOWN;
|
||||||
|
#endif
|
||||||
memcpy (dp->d_name, kdp->d_name,
|
memcpy (dp->d_name, kdp->d_name,
|
||||||
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
|
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user