mirror of https://git.musl-libc.org/git/musl
Browse Source
this interface was added as the outcome of Austin Group tracker issue 697. no error is specified for unsupported flags, which is probably an oversight. for now, EOPNOTSUPP is used so as not to overload EINVAL.master
2 changed files with 26 additions and 3 deletions
@ -0,0 +1,11 @@ |
|||
#include <dirent.h> |
|||
#include <limits.h> |
|||
#include <errno.h> |
|||
#include "syscall.h" |
|||
|
|||
int posix_getdents(int fd, void *buf, size_t len, int flags) |
|||
{ |
|||
if (flags) return __syscall_ret(-EOPNOTSUPP); |
|||
if (len>INT_MAX) len = INT_MAX; |
|||
return syscall(SYS_getdents, fd, buf, len); |
|||
} |
|||
Loading…
Reference in new issue