diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-02-10 21:15:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-02-10 21:15:20 +0000 |
commit | 6d165d5c581d18b72ac266f92b0c02522a96785b (patch) | |
tree | 5f8eaf86e6f5ec154933261a4599e7a74497615f /libc/sysdeps/linux/common/bits/dirent.h | |
parent | 0ec5f81305ea56973fbd6a1333cfbb28ea8a475b (diff) |
We need to have the size of struct dirent equal to the size of struct dirent64
so when _FILE_OFFSET_BITS=64 (such that we transparently change 32bit into 64
bit interfaces), we will not lose an unsigned char from d_name which silently
becomes the d_type field instead. oops.
-Erik
Diffstat (limited to 'libc/sysdeps/linux/common/bits/dirent.h')
-rw-r--r-- | libc/sysdeps/linux/common/bits/dirent.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/common/bits/dirent.h b/libc/sysdeps/linux/common/bits/dirent.h index fb40e99cb..76794b08d 100644 --- a/libc/sysdeps/linux/common/bits/dirent.h +++ b/libc/sysdeps/linux/common/bits/dirent.h @@ -30,9 +30,7 @@ struct dirent __off64_t d_off; #endif unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 unsigned char d_type; -#endif char d_name[256]; /* We must not include limits.h! */ }; @@ -52,8 +50,4 @@ struct dirent64 #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF -#ifdef __USE_FILE_OFFSET64 -# define _DIRENT_HAVE_D_TYPE -#else -# undef _DIRENT_HAVE_D_TYPE -#endif +#define _DIRENT_HAVE_D_TYPE |