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/getdents64.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libc/sysdeps/linux/common/getdents64.c') diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c index 53e57b351..a37f5e514 100644 --- a/libc/sysdeps/linux/common/getdents64.c +++ b/libc/sysdeps/linux/common/getdents64.c @@ -35,13 +35,13 @@ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -struct kernel_dirent64 +struct kernel_dirent64 { - uint64_t d_ino; - int64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; + uint64_t d_ino; + int64_t d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; }; -- cgit v1.2.3