1 /* For this test, we need to do the lstat syscall directly, or else 2 glibc gets a SEGV. 3 #notarget: cris*-*-elf 4 */ 5 6 #include <unistd.h> 7 #include <sys/syscall.h> 8 #include <stdio.h> 9 #include <errno.h> 10 #include <stdlib.h> 11 main(void)12int main (void) 13 { 14 int ret; 15 16 /* From Linux, we get EFAULT. The simulator sends us EINVAL. */ 17 ret = syscall (SYS_lstat64, ".", NULL); 18 if (ret != -1 || (errno != EINVAL && errno != EFAULT)) 19 { 20 perror ("lstat"); 21 abort (); 22 } 23 24 printf ("pass\n"); 25 exit (0); 26 } 27