diff options
author | Florian Weimer <fweimer@redhat.com> | 2019-06-07 09:27:01 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2019-06-07 09:27:01 +0200 |
commit | 51ea67d54882318c4fa5394c386f4816ddc22408 (patch) | |
tree | 9b1f881f8d4e8b464a2d3b08b805e97a35457c7d /include | |
parent | de751ebc9efa97ce0115e42bd55fa1beeb614380 (diff) | |
download | glibc-51ea67d54882318c4fa5394c386f4816ddc22408.tar glibc-51ea67d54882318c4fa5394c386f4816ddc22408.tar.gz glibc-51ea67d54882318c4fa5394c386f4816ddc22408.tar.bz2 glibc-51ea67d54882318c4fa5394c386f4816ddc22408.zip |
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 <carlos@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/dirent.h | 10 |
1 files changed, 7 insertions, 3 deletions
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 <unistd.h>. */ +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, |