aboutsummaryrefslogtreecommitdiff
path: root/src/unistd/access.c
blob: 7c8ed8987fb7d5a3d361f624cc9dbdc36e6cc716 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unistd.h>
#include <fcntl.h>
#include "syscall.h"

int access(const char *filename, int amode)
{
#ifdef SYS_access
	return syscall(SYS_access, filename, amode);
#else
	return syscall(SYS_faccessat, AT_FDCWD, filename, amode, 0);
#endif
}


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