1 #include "tests.h" 2 #include <asm/unistd.h> 3 4 #ifdef __NR_link 5 6 # include <stdio.h> 7 # include <unistd.h> 8 9 int main(void)10main(void) 11 { 12 static const char sample_1[] = "link_sample_old"; 13 static const char sample_2[] = "link_sample_new"; 14 15 long rc = syscall(__NR_link, sample_1, sample_2); 16 printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", 17 sample_1, sample_2, rc, errno2name()); 18 19 puts("+++ exited with 0 +++"); 20 return 0; 21 } 22 23 #else 24 25 SKIP_MAIN_UNDEFINED("__NR_link") 26 27 #endif 28