aboutsummaryrefslogtreecommitdiff
path: root/src/linux/getdents.c
blob: ef82756d4e708a01d70c9a943b12161fa8af400d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define _BSD_SOURCE
#include <dirent.h>
#include <limits.h>
#include "syscall.h"

int getdents(int fd, struct dirent *buf, size_t len)
{
	if (len>INT_MAX) len = INT_MAX;
	return syscall(SYS_getdents, fd, buf, len);
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif