1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Remove some pre-2.6.16 Linux kernel conditionals.

This commit is contained in:
Joseph Myers
2012-08-07 23:03:35 +00:00
parent a281decc87
commit 93df14eee8
7 changed files with 35 additions and 160 deletions

View File

@ -97,7 +97,6 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
{
ssize_t retval;
#ifdef __ASSUME_GETDENTS32_D_TYPE
/* The d_ino and d_off fields in kernel_dirent and dirent must have
the same sizes and alignments. */
if (sizeof (DIRENT_TYPE) == sizeof (struct dirent)
@ -135,7 +134,6 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
return retval;
}
#endif
off64_t last_offset = -1;
@ -293,11 +291,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
DIRENT_SET_DP_INO(dp, kdp->d_ino);
dp->d_off = kdp->d_off;
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;
#endif
memcpy (dp->d_name, kdp->d_name,
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));