From 416f6388c3756b92b99bd36ab12de957cf55409b Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Wed, 15 Dec 2010 10:37:57 -0600 Subject: [PATCH] windows build fixes for last commit --- libs/stfu/stfu.c | 4 +++- libs/stfu/stfu.h | 2 +- src/switch_rtp.c | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libs/stfu/stfu.c b/libs/stfu/stfu.c index 72459caad9..4965b12e34 100644 --- a/libs/stfu/stfu.c +++ b/libs/stfu/stfu.c @@ -40,6 +40,8 @@ #ifdef _MSC_VER /* warning C4706: assignment within conditional expression*/ #pragma warning(disable: 4706) +/* warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. */ +#pragma warning(disable:4996) #endif #define least1(_z) (_z ? _z : 1) @@ -641,7 +643,7 @@ stfu_frame_t *stfu_n_read_a_frame(stfu_instance_t *i) if (!found && i->samples_per_packet) { - int y; + uint32_t y; stfu_frame_t *frame = NULL; int32_t delay = i->last_rd_ts - i->cur_ts; diff --git a/libs/stfu/stfu.h b/libs/stfu/stfu.h index f65511b5f4..ad769c62e2 100644 --- a/libs/stfu/stfu.h +++ b/libs/stfu/stfu.h @@ -136,7 +136,7 @@ typedef void (*stfu_logger_t)(const char *file, const char *func, int line, int int stfu_vasprintf(char **ret, const char *fmt, va_list ap); -STFU_DECLARE_DATA extern stfu_logger_t stfu_log; +extern stfu_logger_t stfu_log; /*! Sets the logger for libstfu. Default is the null_logger */ void stfu_global_set_logger(stfu_logger_t logger); diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 08a22ccac2..4e667fb49b 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -2135,11 +2135,18 @@ static void do_flush(switch_rtp_t *rtp_session) flushed++; +#ifdef _MSC_VER +#pragma warning(push) /* remove this stuff when "if (0" is removed */ +#pragma warning(disable:4127) +#endif if (0 && rtp_session->jb) { stfu_n_eat(rtp_session->jb, ntohl(rtp_session->recv_msg.header.ts), rtp_session->recv_msg.header.pt, rtp_session->recv_msg.body, bytes - rtp_header_len); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif rtp_session->stats.inbound.raw_bytes += bytes; rtp_session->stats.inbound.flush_packet_count++;