blob: ce81349d142a7abbe007a186c0eae27c693ce11c [file] [log] [blame]
Elliott Hughesd35df492017-02-15 15:19:05 -08001#include "tests.h"
2#include <asm/unistd.h>
3
4#ifdef __NR_faccessat
5
6# include <stdio.h>
7# include <unistd.h>
8
9int
10main(void)
11{
12 static const char sample[] = "faccessat.sample";
13 const long int fd = (long int) 0xdeadbeefffffffffULL;
14
15 long rc = syscall(__NR_faccessat, fd, sample, F_OK);
16 printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n",
17 (int) fd, sample, rc, errno2name());
18
19 puts("+++ exited with 0 +++");
20 return 0;
21}
22
23#else
24
25SKIP_MAIN_UNDEFINED("__NR_faccessat")
26
27#endif