FS-5223 FS-6603 on platforms that have SO_REUSEPORT it also implies SO_REUSEADDR, On platforms that only have SO_REUSEADDR it seems to imply both in the absence of SO_REUSEPORT.
This commit is contained in:
parent
5dbfc57308
commit
311889634b
|
@ -1 +1 @@
|
|||
Mon Jun 9 14:22:59 EDT 2014
|
||||
Tue Jun 17 21:14:36 CDT 2014
|
||||
|
|
|
@ -350,8 +350,13 @@ int su_getsocktype(su_socket_t s)
|
|||
|
||||
int su_setreuseaddr(su_socket_t s, int reuse)
|
||||
{
|
||||
#ifdef SO_REUSEPORT
|
||||
return setsockopt(s, SOL_SOCKET, SO_REUSEPORT,
|
||||
(void *)&reuse, (socklen_t)sizeof(reuse));
|
||||
#else
|
||||
return setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
|
||||
(void *)&reuse, (socklen_t)sizeof(reuse));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue