]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
readdir.2: Use syscall(SYS_...); for system calls without a wrapper
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 10 May 2021 17:55:46 +0000 (19:55 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 11 May 2021 05:28:45 +0000 (17:28 +1200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/readdir.2

index f4bd5bdf79c5bd4b14cb6099f70e8a3317913506..fde142413fb51434e26b253a0ad2466810337479 100644 (file)
 readdir \- read directory entry
 .SH SYNOPSIS
 .nf
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
 .PP
-.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 );
 .fi
 .PP
 .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.
 .SH DESCRIPTION
 This is not the function you are interested in.
 Look at
@@ -116,8 +120,6 @@ File descriptor does not refer to a directory.
 .SH CONFORMING TO
 This system call is Linux-specific.
 .SH NOTES
-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.