• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "tests.h"
2 #include <asm/unistd.h>
3 
4 #ifdef __NR_flock
5 
6 # include <stdio.h>
7 # include <sys/file.h>
8 # include <unistd.h>
9 
10 int
main(void)11 main(void)
12 {
13 	const unsigned long fd = (long int) 0xdeadbeefffffffffULL;
14 
15 	long rc = syscall(__NR_flock, fd, LOCK_SH);
16 	printf("flock(%d, LOCK_SH) = %ld %s (%m)\n",
17 	       (int) fd, rc, errno2name());
18 
19 	puts("+++ exited with 0 +++");
20 	return 0;
21 }
22 
23 #else
24 
25 SKIP_MAIN_UNDEFINED("__NR_flock")
26 
27 #endif
28