Why would the Linux man page actually tell the truth?
This commit is contained in:
parent
060c0d5fcb
commit
03480d7333
1 changed files with 1 additions and 2 deletions
|
|
@ -13,10 +13,9 @@ mygetdents(int fd, struct dirent *buf, int n)
|
||||||
off_t off;
|
off_t off;
|
||||||
int nn;
|
int nn;
|
||||||
|
|
||||||
|
/* This doesn't match the man page, but it works in Debian with a 2.2 kernel */
|
||||||
off = p9seek(fd, 0, 1);
|
off = p9seek(fd, 0, 1);
|
||||||
nn = getdirentries(fd, (void*)buf, n, &off);
|
nn = getdirentries(fd, (void*)buf, n, &off);
|
||||||
if(nn > 0)
|
|
||||||
p9seek(fd, off, 0);
|
|
||||||
return nn;
|
return nn;
|
||||||
}
|
}
|
||||||
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue