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 --- sysdeps/unix/sysv/linux/bits/unistd_ext.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sysdeps/unix/sysv/linux/bits') diff --git a/sysdeps/unix/sysv/linux/bits/unistd_ext.h b/sysdeps/unix/sysv/linux/bits/unistd_ext.h index 0061172..6e7b2bb 100644 --- a/sysdeps/unix/sysv/linux/bits/unistd_ext.h +++ b/sysdeps/unix/sysv/linux/bits/unistd_ext.h @@ -22,6 +22,12 @@ #ifdef __USE_GNU +/* Read from the directory descriptor FD into LENGTH bytes at BUFFER. + Return the number of bytes read on success (0 for end of + directory), and -1 for failure. */ +extern ssize_t getdents64 (int __fd, void *__buffer, size_t __length) + __THROW __nonnull ((2)); + /* Return the kernel thread ID (TID) of the current thread. The returned value is not subject to caching. Most Linux system calls accept a TID in place of a PID. Using the TID to change properties -- cgit v1.1