Use shutdown() from FreeBSD

This commit is contained in:
Sebastian Huber
2013-10-11 14:48:13 +02:00
parent bada2f77d0
commit 6ffb9b9e27
5 changed files with 108 additions and 29 deletions

View File

@@ -55,6 +55,8 @@ int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict,
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int shutdown(int, int);
int socket(int, int, int);
__END_DECLS

View File

@@ -538,31 +538,6 @@ accept (int s, struct sockaddr *name, int *namelen)
return -1;
}
/*
* Shutdown routine
*/
int
shutdown (int s, int how)
{
struct socket *so;
int error = 0;
if ((so = rtems_bsdnet_fdToSocket (s)) == NULL) {
error = EBADF;
}
if( error == 0 )
{
error = soshutdown(so, how);
}
if( error == 0 )
{
return error;
}
errno = error;
return -1;
}
int
kern_sendit(td, s, mp, flags, control, segflg)
struct thread *td;