diff mbox series

[37/39] readdir.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210510175546.28445-38-alx.manpages@gmail.com
State Not Applicable
Headers show
Series man2: SYNOPSIS: Fix headers, use syscall(), and other fixes | expand


Context Check Description
dj/TryBot-apply_patch fail Patch failed to apply to master at the time it was sent

Commit Message

Alejandro Colomar \(man-pages\) May 10, 2021, 5:55 p.m. UTC
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
 man2/readdir.2 | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series


diff --git a/man2/readdir.2 b/man2/readdir.2
index f4bd5bdf7..fde142413 100644
--- a/man2/readdir.2
+++ b/man2/readdir.2
@@ -32,13 +32,17 @@ 
 readdir \- read directory entry
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
-.BI "int readdir(unsigned int " fd ", struct old_linux_dirent *" dirp ","
-.BI "            unsigned int " count );
+.BI "int syscall(SYS_readdir, unsigned int " fd ,
+.BI "            struct old_linux_dirent *" dirp ", unsigned int " count );
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no definition of
+.BR "struct old_linux_dirent" ;
+see NOTES.
 This is not the function you are interested in.
 Look at
@@ -116,8 +120,6 @@  File descriptor does not refer to a directory.
 This system call is Linux-specific.
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
 You will need to define the
 .I old_linux_dirent
 structure yourself.