summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/getdents64.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-16 01:07:23 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:37 +0200
commite21479da34bbe39fb9d99e2f6e323fd1a942d9cb (patch)
treef1240e0f522f2515cf27b48fe11c38eecaa00a90 /libc/sysdeps/linux/common/getdents64.c
parenta4b93f0bef877d6e996037696ecb1779bfe46074 (diff)
*64.[cS]: use _lfs_64.h instead of features.h and remove LFS guard
_lfs_64.h makes the compile fail, if LFS is not enabled, no need for the guard. Reorganize to include only the minimal necessary headers. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/getdents64.c')
-rw-r--r--libc/sysdeps/linux/common/getdents64.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c
index e1133fffa..aacbe97cc 100644
--- a/libc/sysdeps/linux/common/getdents64.c
+++ b/libc/sysdeps/linux/common/getdents64.c
@@ -4,7 +4,11 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#include <features.h>
+#include <_lfs_64.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_getdents64
+
#include <assert.h>
#include <errno.h>
#include <dirent.h>
@@ -12,19 +16,10 @@
#include <stdint.h>
#include <string.h>
#include <unistd.h>
-#include <dirent.h>
#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <bits/kernel_types.h>
+#include <bits/wordsize.h>
#include <bits/uClibc_alloc.h>
-#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
-
-# ifndef offsetof
-# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-# endif
-
struct kernel_dirent64
{
uint64_t d_ino;