URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 157 |
Rev 223 |
/*
|
/*
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
*/
|
*/
|
|
|
#include <sys/types.h>
|
#include <sys/types.h>
|
#include <sys/socket.h>
|
#include <sys/socket.h>
|
#include <netinet/in.h>
|
#include <netinet/in.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <errno.h>
|
#include <errno.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
/* Check that socketcall is suitably stubbed. */
|
/* Check that socketcall is suitably stubbed. */
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
int ret = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
int ret = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
|
|
if (ret != -1)
|
if (ret != -1)
|
{
|
{
|
fprintf (stderr, "sock: %d\n", ret);
|
fprintf (stderr, "sock: %d\n", ret);
|
abort ();
|
abort ();
|
}
|
}
|
|
|
if (errno != ENOSYS)
|
if (errno != ENOSYS)
|
{
|
{
|
perror ("unexpected");
|
perror ("unexpected");
|
abort ();
|
abort ();
|
}
|
}
|
|
|
printf ("pass\n");
|
printf ("pass\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.