call setsockopt(SO_REUSEADDR)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3366 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -138,6 +138,12 @@ init_socket(struct descr *d, int family, int type, int port)
|
||||
d->s = -1;
|
||||
return;
|
||||
}
|
||||
#if defined(HAVE_SETSOCKOPT) && defined(SOL_SOCKET) && defined(SO_REUSEADDR)
|
||||
{
|
||||
int one = 1;
|
||||
setsockopt(d->s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
|
||||
}
|
||||
#endif
|
||||
d->type = type;
|
||||
memset(&sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
|
Reference in New Issue
Block a user