aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-20 18:14:31 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-20 18:14:31 +0000
commit9bf87d6ef0f763328be7f5756b64d754e4e37894 (patch)
tree02654aa9821d603451480bc53d50d24a4d85f615
parent1610dd5a62dbe2b05db0a7a85f1919aa3515d2b7 (diff)
Merged revisions 253536-253538,253540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r253536 | russell | 2010-03-20 06:33:30 -0500 (Sat, 20 Mar 2010) | 4 lines Use SHRT_MAX instead of MAXSHORT. These changes fix build issues I had with this module on FreeBSD. ........ r253537 | russell | 2010-03-20 06:39:39 -0500 (Sat, 20 Mar 2010) | 2 lines Resolve a compiler warning on FreeBSD. ........ r253538 | russell | 2010-03-20 06:43:08 -0500 (Sat, 20 Mar 2010) | 2 lines Resolve compiler warnings on FreeBSD. ........ r253540 | russell | 2010-03-20 07:03:07 -0500 (Sat, 20 Mar 2010) | 2 lines Resolve more compiler warnings on FreeBSD. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@253626 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_followme.c4
-rw-r--r--cdr/cdr_pgsql.c6
-rw-r--r--channels/chan_dahdi.c2
-rw-r--r--main/features.c1
-rw-r--r--main/stdtime/localtime.c1
-rw-r--r--main/tcptls.c1
-rw-r--r--pbx/pbx_dundi.c1
8 files changed, 12 insertions, 8 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 228524cb6..3b9a61244 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1274,12 +1274,12 @@ static void end_bridge_callback(void *data)
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+ snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+ snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 21e5c549a..8f982f197 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -889,12 +889,12 @@ static void end_bridge_callback(void *data)
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
+ snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
- snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
+ snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c
index e9bc7c071..c3a12c0e3 100644
--- a/cdr/cdr_pgsql.c
+++ b/cdr/cdr_pgsql.c
@@ -171,7 +171,7 @@ static int pgsql_log(struct ast_cdr *cdr)
if (strcmp(cur->name, "start") == 0 || strcmp(cur->name, "calldate") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
- lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->start.tv_sec);
+ lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->start.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->start.tv_sec + (double)cdr->start.tv_usec / 1000000.0);
@@ -184,7 +184,7 @@ static int pgsql_log(struct ast_cdr *cdr)
} else if (strcmp(cur->name, "answer") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
- lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->answer.tv_sec);
+ lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->answer.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->answer.tv_sec + (double)cdr->answer.tv_usec / 1000000.0);
@@ -197,7 +197,7 @@ static int pgsql_log(struct ast_cdr *cdr)
} else if (strcmp(cur->name, "end") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
- lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->end.tv_sec);
+ lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->end.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->end.tv_sec + (double)cdr->end.tv_usec / 1000000.0);
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index a1249edc1..e5adb979b 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -49,7 +49,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
#include <signal.h>
#else
diff --git a/main/features.c b/main/features.c
index 7625a5875..ea072b282 100644
--- a/main/features.c
+++ b/main/features.c
@@ -30,6 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/_private.h"
#include <pthread.h>
+#include <signal.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <netinet/in.h>
diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c
index b25b8ab14..74c441049 100644
--- a/main/stdtime/localtime.c
+++ b/main/stdtime/localtime.c
@@ -48,6 +48,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include <signal.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <float.h>
diff --git a/main/tcptls.c b/main/tcptls.c
index f0c8be13d..0a45151ed 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <fcntl.h>
#endif
+#include <signal.h>
#include <sys/signal.h>
#include "asterisk/compat.h"
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 2428d5b28..85b7f6b59 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
#include <net/if_dl.h>
#include <ifaddrs.h>
+#include <signal.h>
#endif
#include "asterisk/file.h"