From 965777ccfc61067d1dc79f79c12d52f794fa3983 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Mon, 26 Jan 2015 14:50:40 +0000 Subject: Various fixes for OS X This patch addresses compilation errors on OS X. It's been a while, so there's quite a few things. * Fixed __attribute__ decls in route.h to be portable. * Fixed htonll and ntohll to work when they are defined as macros. * Replaced sem_t usage with our ast_sem wrapper. * Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC 4.9 warnings using sig*set() functions. * Fixed some format strings for portability. * Fixed compilation issues with res_timing_kqueue (although tests still fail on OS X). * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by: George Joseph ASTERISK-24544 #close Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/4327/ ........ Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/rtp_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/rtp_engine.c') diff --git a/main/rtp_engine.c b/main/rtp_engine.c index 962899b57..7326adf65 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -1948,7 +1948,7 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg, char sec[32]; char usec[32]; snprintf(sec, sizeof(sec), "%lu", payload->report->sender_information.ntp_timestamp.tv_sec); - snprintf(usec, sizeof(usec), "%lu", payload->report->sender_information.ntp_timestamp.tv_usec); + snprintf(usec, sizeof(usec), "%lu", (unsigned long)payload->report->sender_information.ntp_timestamp.tv_usec); json_rtcp_sender_info = ast_json_pack("{s: s, s: s, s: i, s: i, s: i}", "ntp_timestamp_sec", sec, "ntp_timestamp_usec", usec, -- cgit v1.2.3