.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu)
-.TH SEEKDIR 3 2009-03-11 "" "Linux Programmer's Manual"
+.\"
+.TH SEEKDIR 3 2013-09-09 "" "Linux Programmer's Manual"
.SH NAME
seekdir \- set the position of the next readdir() call in the directory
stream.
.nf
.B #include <dirent.h>
.sp
-.BI "void seekdir(DIR *" dirp ", long " offset );
+.BI "void seekdir(DIR *" dirp ", long " loc );
.fi
.sp
.in -4n
from which the next
.BR readdir (2)
call will start.
-.BR seekdir ()
-should be used with an
-.I offset
-returned by
+The
+.I loc
+argument should be a value returned by a previous call to
.BR telldir (3).
.SH RETURN VALUE
The
.BR seekdir ()
function returns no value.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR seekdir ()
+function is thread-safe.
.SH CONFORMING TO
4.3BSD, POSIX.1-2001.
.SH NOTES
In glibc up to version 2.1.1, the type of the
-.I offset
+.I loc
argument was
.IR off_t .
POSIX.1-2001 specifies
.IR long ,
and this is the type used since glibc 2.1.2.
+See
+.BR telldir (3)
+for information on why you should be careful in making any
+assumptions about the value in this argument.
.SH SEE ALSO
.BR lseek (2),
.BR closedir (3),