use AT_FDCWD instead of -1

This commit is contained in:
leitner 2016-07-14 16:47:05 +00:00
parent 5c999f4c62
commit c3c05dd884

@ -10,7 +10,8 @@ mmap_readat opens \fIfilename\fR for reading, maps the whole file into
memory, closes the file, writes the length of the file to \fIfilesize\fR memory, closes the file, writes the length of the file to \fIfilesize\fR
and returns a pointer to the mapped file. and returns a pointer to the mapped file.
If \fIfilename\fR is a relative path and \fIdirfd\fR is not -1, If \fIfilename\fR is a relative path and \fIdirfd\fR is not AT_FDCWD
(defined in fcntl.h),
\fIfilename\fR is interpreted relative to \fIdirfd\fR, which must be an \fIfilename\fR is interpreted relative to \fIdirfd\fR, which must be an
open directory. open directory.