提交 108bb09a authored 作者: Michael Jerris's avatar Michael Jerris

ifdef for sctp

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@393 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 7897701d
......@@ -44,7 +44,9 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef SS7BC_USE_SCTP
#include <netinet/sctp.h>
#endif
#include <arpa/inet.h>
#include <stdarg.h>
#include <netdb.h>
......@@ -109,8 +111,10 @@ typedef struct ss7bc_connection ss7bc_connection_t;
/* disable nagle's algorythm */
static inline void sctp_no_nagle(int socket)
{
#ifdef SS7BC_USE_SCTP
int flag = 1;
setsockopt(socket, IPPROTO_SCTP, SCTP_NODELAY, (char *) &flag, sizeof(int));
#endif
}
int ss7bc_connection_close(ss7bc_connection_t *mcon);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论