mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
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;
|
||||
int nn;
|
||||
|
||||
/* This doesn't match the man page, but it works in Debian with a 2.2 kernel */
|
||||
off = p9seek(fd, 0, 1);
|
||||
nn = getdirentries(fd, (void*)buf, n, &off);
|
||||
if(nn > 0)
|
||||
p9seek(fd, off, 0);
|
||||
return nn;
|
||||
}
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||
|
|
Loading…
Reference in a new issue