readdir.2: Use syscall(SYS_...); for system calls without a wrapper

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-05-10 19:55:46 +02:00 committed by Michael Kerrisk
parent 05214ec7ba
commit 8f33ee075a
1 changed files with 7 additions and 5 deletions

View File

@ -32,13 +32,17 @@
readdir \- read directory entry readdir \- read directory entry
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.PP .PP
.BI "int readdir(unsigned int " fd ", struct old_linux_dirent *" dirp "," .BI "int syscall(SYS_readdir, unsigned int " fd ,
.BI " unsigned int " count ); .BI " struct old_linux_dirent *" dirp ", unsigned int " count );
.fi .fi
.PP .PP
.IR Note : .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 .SH DESCRIPTION
This is not the function you are interested in. This is not the function you are interested in.
Look at Look at
@ -116,8 +120,6 @@ File descriptor does not refer to a directory.
.SH CONFORMING TO .SH CONFORMING TO
This system call is Linux-specific. This system call is Linux-specific.
.SH NOTES .SH NOTES
Glibc does not provide a wrapper for this system call; call it using
.BR syscall (2).
You will need to define the You will need to define the
.I old_linux_dirent .I old_linux_dirent
structure yourself. structure yourself.