blob: 911c167577fc8eb9872f2a5731329e9cf5642b2c [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
Fei Jie16c078e2016-03-31 16:06:50 +08006# include <stdio.h>
7# include <unistd.h>
8
9int
10main(void)
11{
12 const long int fd = (long int) 0xdeadbeefffffffff;
Dmitry V. Levin1717c8c2016-04-21 20:46:44 +000013
14 long rc = syscall(__NR_fsync, fd);
15 printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name());
Fei Jie16c078e2016-03-31 16:06:50 +080016
17 puts("+++ exited with 0 +++");
18 return 0;
19}
20
21#else
22
23SKIP_MAIN_UNDEFINED("__NR_fsync")
24
25#endif