diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-02-03 22:00:46 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-02-03 22:00:46 +0000 |
commit | ace0567fd06f77d17cc61372bef14c78d9e92559 (patch) | |
tree | f0907606c9c829280610d6bc77fdf2dfbeb40179 /libc/sysdeps/linux/common/getdents64.c | |
parent | c92bfe37014877dae5115277f13b612bc7076433 (diff) |
Fixup compile on 2.2.x kernels when UCLIBC_HAS_LFS is enabled
Diffstat (limited to 'libc/sysdeps/linux/common/getdents64.c')
-rw-r--r-- | libc/sysdeps/linux/common/getdents64.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c index 0fb7336f3..53e57b351 100644 --- a/libc/sysdeps/linux/common/getdents64.c +++ b/libc/sysdeps/linux/common/getdents64.c @@ -17,9 +17,6 @@ 02111-1307 USA. */ #include <features.h> - -#ifdef __UCLIBC_HAS_LFS__ - #include <alloca.h> #include <assert.h> #include <errno.h> @@ -28,11 +25,13 @@ #include <stdint.h> #include <string.h> #include <unistd.h> +#include <sysdep.h> #include <sys/param.h> #include <sys/types.h> -#include <sysdep.h> #include <sys/syscall.h> +#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 + #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) @@ -104,5 +103,11 @@ ssize_t __getdents64 (int fd, char *buf, size_t nbytes) } return (char *) dp - buf; } +#else +ssize_t __getdents (int fd, char *buf, size_t nbytes); +ssize_t __getdents64 (int fd, char *buf, size_t nbytes) +{ + return(__getdents(fd, buf, nbytes)); +} #endif /* __UCLIBC_HAS_LFS__ */ |