Module: sip-router Branch: master Commit: ee368a4c2672c2ae4f9a2ed5478f195f30f5e173 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ee368a4c...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Aug 22 23:45:44 2011 +0200
sipcapture: fixed compilation on mac os x
- added missing include files - wrapped label error around linux os defines since it is used only there and throws warning on other systems
---
modules/sipcapture/sipcapture.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c index 648bbe7..114b9ee 100644 --- a/modules/sipcapture/sipcapture.c +++ b/modules/sipcapture/sipcapture.c @@ -33,6 +33,13 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <sys/ioctl.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <net/if.h> +#include <netdb.h> + #include "../../sr_module.h" #include "../../dprint.h" #include "../../events.h" @@ -464,9 +471,11 @@ static int mod_init(void) { }
return 0; +#ifdef __OS_linux error: if(raw_sock_desc) close(raw_sock_desc); return -1; +#endif }
int extract_host_port(void) @@ -628,7 +637,9 @@ int hep_msg_received(void *data) if(heph->hp_p == IPPROTO_UDP) ri->proto=PROTO_UDP; else if(heph->hp_p == IPPROTO_TCP) ri->proto=PROTO_TCP; else if(heph->hp_p == IPPROTO_IDP) ri->proto=PROTO_TLS; /* fake protocol */ +#ifdef USE_SCTP else if(heph->hp_p == IPPROTO_SCTP) ri->proto=PROTO_SCTP; +#endif else { LOG(L_ERR, "ERROR: sipcapture:hep_msg_received: unknow protocol [%d]\n",heph->hp_p); ri->proto = PROTO_NONE;