diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3 index 992d2fcde520..1c568fc14b1b 100644 --- a/lib/libc/gen/directory.3 +++ b/lib/libc/gen/directory.3 @@ -122,9 +122,12 @@ function returns a pointer to the next directory entry. It returns .Dv NULL -upon reaching the end of the directory or detecting an invalid -.Fn seekdir -operation. +upon reaching the end of the directory or on error. +In the event of an error, +.Va errno +may be set to any of the values documented for the +.Xr getdirentries 2 +system call. .Pp The .Fn readdir_r