blob: bd0cb1ea511af7ea07f09c7bce49f14897449379 [file] [log] [blame]
Fei Jie16c078e2016-03-31 16:06:50 +08001#include "tests.h"
2#include <sys/syscall.h>
3
4#ifdef __NR_fsync
5
6# include <errno.h>
7# include <stdio.h>
8# include <unistd.h>
9
10int
11main(void)
12{
13 const long int fd = (long int) 0xdeadbeefffffffff;
Dmitry V. Levin1717c8c2016-04-21 20:46:44 +000014
15 long rc = syscall(__NR_fsync, fd);
16 printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
Fei Jie16c078e2016-03-31 16:06:50 +080017
18 puts("+++ exited with 0 +++");
19 return 0;
20}
21
22#else
23
24SKIP_MAIN_UNDEFINED("__NR_fsync")
25
26#endif