From 477dc278c250c55bca3b4227d9d34cf884d1b24d Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 29 Aug 2014 16:26:13 +0000 Subject: [PATCH] added conditionals for SOL_SCTP --- qse/cmd/http/ursd.c | 4 ++-- qse/lib/http/httpd-std.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qse/cmd/http/ursd.c b/qse/cmd/http/ursd.c index e1aa98dd..cb228674 100644 --- a/qse/cmd/http/ursd.c +++ b/qse/cmd/http/ursd.c @@ -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) { diff --git a/qse/lib/http/httpd-std.c b/qse/lib/http/httpd-std.c index eaa8aa8e..ac961643 100644 --- a/qse/lib/http/httpd-std.c +++ b/qse/lib/http/httpd-std.c @@ -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;