From 9ef33266bfb84d65c760ccfbce8384e76ad3e14d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 21 Dec 2000 20:49:50 +0000 Subject: This file violated policy and directly used kernel headers. This fixes it by using our own copy of the stuct in question. --- libc/sysdeps/linux/common/getdents.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/common/getdents.c') diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 940532da2..20d79868c 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -27,7 +27,7 @@ #include -#include +#include #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) @@ -37,11 +37,16 @@ extern int _getdents __P ((int fd, char *buf, size_t nbytes)); /* For Linux we need a special version of this file since the definition of `struct dirent' is not the same for the kernel and the libc. There is one additional field which might be introduced - in the kernel structure in the future. + in the kernel structure in the future. Here is a copy of the kernel + struct dirent... */ -#define dirent kernel_dirent -#include -#undef dirent +struct kernel_dirent { + long d_ino; + __kernel_off_t d_off; + unsigned short d_reclen; + char d_name[256]; /* We must not include limits.h! */ +}; + #ifdef GETDENTS64 -- cgit v1.2.3