summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/access.c
blob: da3cb936a8bbe1756e04cee4dfedb8407abb7ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * access() for uClibc
 *
 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
 *
 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 */

#include <sys/syscall.h>
#include <unistd.h>

#if defined __NR_faccessat && !defined __NR_access
# include <fcntl.h>
int access(const char *pathname, int mode)
{
	return faccessat(AT_FDCWD, pathname, mode, 0);
}

#else
_syscall2(int, access, const char *, pathname, int, mode)
#endif