xref: /aosp_15_r20/external/musl/src/dirent/posix_getdents.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1 #include <dirent.h>
2 #include <limits.h>
3 #include <errno.h>
4 #include "syscall.h"
5 
posix_getdents(int fd,void * buf,size_t len,int flags)6 ssize_t 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 }
12