From 51ea67d54882318c4fa5394c386f4816ddc22408 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 7 Jun 2019 09:27:01 +0200 Subject: Linux: Add getdents64 system call No 32-bit system call wrapper is added because the interface is problematic because it cannot deal with 64-bit inode numbers and 64-bit directory hashes. A future commit will deprecate the undocumented getdirentries and getdirentries64 functions. Reviewed-by: Carlos O'Donell --- include/dirent.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include/dirent.h') diff --git a/include/dirent.h b/include/dirent.h index 400835eefe..3736803bce 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -35,10 +35,14 @@ extern __ssize_t __getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off_t *__restrict __basep) __THROW __nonnull ((2, 4)); -extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes) - attribute_hidden; -extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes) + +/* These functions are only implemented on Linux. The public + interface for getdents64 is declared in . */ +extern __ssize_t __getdents (int __fd, void *__buf, size_t __nbytes) attribute_hidden; +extern __ssize_t __getdents64 (int __fd, void *__buf, size_t __nbytes); +libc_hidden_proto (__getdents64) + extern int __alphasort64 (const struct dirent64 **a, const struct dirent64 **b) __attribute_pure__; extern int __versionsort64 (const struct dirent64 **a, -- cgit v1.2.3