xref: /aosp_15_r20/external/musl/src/linux/getdents.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1 #define _BSD_SOURCE
2 #include <dirent.h>
3 #include <limits.h>
4 #include "syscall.h"
5 
getdents(int fd,struct dirent * buf,size_t len)6 int getdents(int fd, struct dirent *buf, size_t len)
7 {
8 	if (len>INT_MAX) len = INT_MAX;
9 	return syscall(SYS_getdents, fd, buf, len);
10 }
11