ifdef for sctp

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@393 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-02-12 18:38:26 +00:00
parent 0b25d3af9f
commit ee89a1eb55
1 changed files with 4 additions and 0 deletions

View File

@ -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);