From 6d165d5c581d18b72ac266f92b0c02522a96785b Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 10 Feb 2003 21:15:20 +0000 Subject: 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 --- libc/sysdeps/linux/common/bits/dirent.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libc/sysdeps/linux/common/bits/dirent.h') 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 -- cgit v1.2.3