aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-20 19:17:28 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-20 19:17:28 +0000
commitb087a0e5f0d8319a58c44395161dfefd66980ceb (patch)
tree5a39ac0c6b2c91c8b4477a28f8763f7e3215b675
parentd2874f39e82a67ce55f9fb73a08e7fc54341e773 (diff)
Resolve a number of FreeBSD build issues.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@253631 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--Makefile4
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_followme.c4
-rw-r--r--channels/chan_dahdi.c2
-rw-r--r--main/http.c1
-rw-r--r--main/manager.c2
-rw-r--r--main/sched.c2
-rw-r--r--main/utils.c4
-rw-r--r--pbx/pbx_dundi.c1
-rw-r--r--res/res_features.c3
10 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 41d3017fb..778879d31 100644
--- a/Makefile
+++ b/Makefile
@@ -358,10 +358,10 @@ $(SUBDIRS): include/asterisk/version.h include/asterisk/buildopts.h defaults.h m
main: $(filter-out main,$(MOD_SUBDIRS))
$(MOD_SUBDIRS):
- +@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+ +@_ASTCFLAGS="$(MOD_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
$(OTHER_SUBDIRS):
- +@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
+ +@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
defaults.h: makeopts
@build_tools/make_defaults_h > $@.tmp
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 963b0c9ce..b8ce0fabe 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -870,12 +870,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 6b228f416..4b93b3b10 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -928,12 +928,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/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 63ac20a10..d21ec017f 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -51,7 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <stdio.h>
#include <string.h>
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
#include <signal.h>
#else
diff --git a/main/http.c b/main/http.c
index cee1d913c..f8d9f1e52 100644
--- a/main/http.c
+++ b/main/http.c
@@ -47,6 +47,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
+#include <signal.h>
#include "asterisk/cli.h"
#include "asterisk/http.h"
diff --git a/main/manager.c b/main/manager.c
index 173964b19..f3d040f1b 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2589,7 +2589,7 @@ int manager_event(int category, const char *event, const char *fmt, ...)
now = ast_tvnow();
ast_dynamic_str_thread_append(&buf, 0, &manager_event_buf,
"Timestamp: %ld.%06lu\r\n",
- now.tv_sec, (unsigned long) now.tv_usec);
+ (long) now.tv_sec, (unsigned long) now.tv_usec);
}
va_start(ap, fmt);
diff --git a/main/sched.c b/main/sched.c
index cb6098635..8a916cde0 100644
--- a/main/sched.c
+++ b/main/sched.c
@@ -316,7 +316,7 @@ void ast_sched_dump(const struct sched_context *con)
q->id,
q->callback,
q->data,
- delta.tv_sec,
+ (long) delta.tv_sec,
(long int)delta.tv_usec);
}
ast_log(LOG_DEBUG, "=============================================================\n");
diff --git a/main/utils.c b/main/utils.c
index 3fc9faf8f..a9b887205 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1099,12 +1099,12 @@ static struct timeval tvfix(struct timeval a)
{
if (a.tv_usec >= ONE_MILLION) {
ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
- a.tv_sec, (long int) a.tv_usec);
+ (long) a.tv_sec, (long int) a.tv_usec);
a.tv_sec += a.tv_usec / ONE_MILLION;
a.tv_usec %= ONE_MILLION;
} else if (a.tv_usec < 0) {
ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
- a.tv_sec, (long int) a.tv_usec);
+ (long) a.tv_sec, (long int) a.tv_usec);
a.tv_usec = 0;
}
return a;
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 412e24e9a..4b7e25636 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -38,6 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <string.h>
#include <errno.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__Darwin__)
+#include <signal.h>
#include <sys/types.h>
#include <netinet/in_systm.h>
#endif
diff --git a/res/res_features.c b/res/res_features.c
index fa938087a..7bfd5b246 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -33,6 +33,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <pthread.h>
+#include <signal.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
@@ -2726,7 +2727,7 @@ static int handle_parkedcalls(int fd, int argc, char *argv[])
for (cur = parkinglot; cur; cur = cur->next) {
ast_cli(fd, "%-10.10s %25s (%-15s %-12s %-4d) %6lds\n"
,cur->parkingexten, cur->chan->name, cur->context, cur->exten
- ,cur->priority, cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL));
+ ,cur->priority, (long) cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL));
numparked++;
}