From: Alejandro Colomar Date: Mon, 10 May 2021 17:55:11 +0000 (+0200) Subject: getdents.2: Use syscall(SYS_...); for system calls without a wrapper X-Git-Tag: man-pages-5.12~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b63cf3ca7796bb4a284a3ec77277bc60303004e;p=thirdparty%2Fman-pages.git getdents.2: Use syscall(SYS_...); for system calls without a wrapper Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- diff --git a/man2/getdents.2 b/man2/getdents.2 index ec00a73bac..df766b0663 100644 --- a/man2/getdents.2 +++ b/man2/getdents.2 @@ -33,19 +33,29 @@ getdents, getdents64 \- get directory entries .SH SYNOPSIS .nf -.BI "long getdents(unsigned int " fd ", struct linux_dirent *" dirp , +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include +.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 " .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