repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
implement posix_getdents adopted for next issue of POSIX
[musl.git]
/
src
/
dirent
/
posix_getdents.c
blob
b19e8127cd5b8525f6a14b84cd28c3b7a809530d
1
#include <dirent.h>
2
#include <limits.h>
3
#include <errno.h>
4
#include
"syscall.h"
5
6
int
posix_getdents
(
int
fd
,
void
*
buf
,
size_t
len
,
int
flags
)
7
{
8
if
(
flags
)
return
__syscall_ret
(-
EOPNOTSUPP
);
9
if
(
len
>
INT_MAX
)
len
=
INT_MAX
;
10
return
syscall
(
SYS_getdents
,
fd
,
buf
,
len
);
11
}