mirror of https://github.com/mkerrisk/man-pages
getdents.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:
parent
0aa385fe25
commit
4b63cf3ca7
|
@ -33,19 +33,29 @@
|
|||
getdents, getdents64 \- get directory entries
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.BI "long getdents(unsigned int " fd ", struct linux_dirent *" dirp ,
|
||||
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||
.B #include <unistd.h>
|
||||
.PP
|
||||
.BI "long syscall(SYS_getdents, unsigned int " fd \
|
||||
", struct linux_dirent *" dirp ,
|
||||
.BI " unsigned int " count );
|
||||
.PP
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.BR "#include <dirent.h>"
|
||||
.PP
|
||||
.BI "ssize_t getdents64(int " fd ", void *" dirp ", size_t " count );
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no glibc wrapper for
|
||||
.BR getdents ();
|
||||
see NOTES.
|
||||
glibc provides no wrapper for
|
||||
.BR getdents (),
|
||||
necessitating the use of
|
||||
.BR syscall (2).
|
||||
.PP
|
||||
.IR Note :
|
||||
There is no definition of
|
||||
.B struct linux_dirent
|
||||
in glibc; see NOTES.
|
||||
.SH DESCRIPTION
|
||||
These are not the interfaces you are interested in.
|
||||
Look at
|
||||
|
|
Loading…
Reference in New Issue