1 /*
2 #notarget: cris*-*-elf
3 */
4 
5 #include <sys/types.h>
6 #include <sys/socket.h>
7 #include <netinet/in.h>
8 #include <stdio.h>
9 #include <errno.h>
10 #include <stdlib.h>
11 
12 /* Check that socketcall is suitably stubbed.  */
13 
main(void)14 int main (void)
15 {
16   int ret = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
17 
18   if (ret != -1)
19     {
20       fprintf (stderr, "sock: %d\n", ret);
21       abort ();
22     }
23 
24   if (errno != ENOSYS)
25     {
26       perror ("unexpected");
27       abort ();
28     }
29 
30   printf ("pass\n");
31   return 0;
32 }
33