|
@@ -18,6 +18,11 @@
|
|
|
#include <bits/kernel_types.h>
|
|
|
#include <bits/kernel-features.h>
|
|
|
|
|
|
+#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64)
|
|
|
+
|
|
|
+ * for __getdents64 (see getdents64.c). Otherwise...
|
|
|
+ */
|
|
|
+
|
|
|
|
|
|
* 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
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
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
|
|
|
|
|
|
-
|
|
|
-
|
|
|
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
|