added conditionals for SOL_SCTP

This commit is contained in:
hyung-hwan 2014-08-29 16:26:13 +00:00
parent c0fc2e07d6
commit 477dc278c2
2 changed files with 4 additions and 4 deletions

View File

@ -223,7 +223,7 @@ static qse_sck_hnd_t open_server_socket (int proto, const qse_nwad_t* bindnwad)
bind_ok:
if (proto == IPPROTO_SCTP)
{
#if 1
#if defined(SOL_SCTP)
struct sctp_initmsg im;
struct sctp_paddrparams hb;
@ -244,7 +244,7 @@ bind_ok:
hb.spp_pathmaxrxt = 1;
if (setsockopt (s, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
#endif
#endif
if (listen (s, 99) <= -1)
{

View File

@ -730,9 +730,9 @@ static qse_sck_hnd_t open_udp_socket (qse_httpd_t* httpd, int domain, int type,
if (set_socket_nonblock (httpd, fd, 1) <= -1) goto oops;
#if 1
if (proto == IPPROTO_SCTP)
{
#if defined(SOL_SCTP)
struct sctp_initmsg im;
struct sctp_paddrparams hb;
@ -749,8 +749,8 @@ static qse_sck_hnd_t open_udp_socket (qse_httpd_t* httpd, int domain, int type,
hb.spp_pathmaxrxt = 1;
if (setsockopt (fd, SOL_SCTP, SCTP_PEER_ADDR_PARAMS, &hb, QSE_SIZEOF(hb)) <= -1) goto oops;
#endif
}
#endif
return fd;