From f5773054ef6420f52887bfa2c8dd1a40423e2187 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 27 Feb 2009 22:51:07 +0000 Subject: fix breakage in x86_64 defconfig --- libc/sysdeps/linux/common/getdents.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 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 e1aa2a51f..6a38772e8 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -18,6 +18,11 @@ #include #include +#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64) +/* If the condition above is met, __getdents is defined as an alias + * for __getdents64 (see getdents64.c). Otherwise... + */ + /* With newer versions of linux, the getdents syscall returns d_type * information after the name field. * @@ -42,7 +47,8 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden; #define __NR___syscall_getdents __NR_getdents static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count) -#ifdef __ASSUME_GETDENTS32_D_TYPE +#if defined __ASSUME_GETDENTS32_D_TYPE + ssize_t __getdents (int fd, char *buf, size_t nbytes) { ssize_t retval; @@ -72,9 +78,6 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) #elif ! defined __UCLIBC_HAS_LFS__ || ! defined __NR_getdents64 -/* Experimentally off - libc_hidden_proto(memcpy) */ -/* libc_hidden_proto(lseek) */ - ssize_t __getdents (int fd, char *buf, size_t nbytes) { struct dirent *dp; @@ -136,8 +139,6 @@ attribute_hidden strong_alias(__getdents,__getdents64) #elif __WORDSIZE == 32 -/* Experimentally off - libc_hidden_proto(memmove) */ - extern __typeof(__getdents) __getdents64 attribute_hidden; ssize_t __getdents (int fd, char *buf, size_t nbytes) { @@ -165,3 +166,5 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) } #endif + +#endif -- cgit v1.2.3