Home | History | Annotate | Download | only in tests-mx32
      1 #include "tests.h"
      2 #include <asm/unistd.h>
      3 
      4 #ifdef __NR_symlinkat
      5 
      6 # include <stdio.h>
      7 # include <unistd.h>
      8 
      9 int
     10 main(void)
     11 {
     12 	const long int fd = (long int) 0xdeadbeefffffffffULL;
     13 	static const char oldpath[] = "symlink_old";
     14 	static const char newpath[] = "symlink_new";
     15 
     16 	long rc = syscall(__NR_symlinkat, oldpath, fd, newpath);
     17 	printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n",
     18 	       oldpath, (int) fd, newpath, rc, errno2name());
     19 
     20 	puts("+++ exited with 0 +++");
     21 	return 0;
     22 }
     23 
     24 #else
     25 
     26 SKIP_MAIN_UNDEFINED("__NR_symlinkat")
     27 
     28 #endif
     29