Resolve 1.6.0 compilation issues on FreeBSD.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@253630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 15 years ago
parent d18064d8bd
commit abcca6dd11

@ -48,6 +48,7 @@ static int waituntil_exec(struct ast_channel *chan, void *data)
{
int res;
double fraction;
long seconds;
struct timeval future = { 0, };
struct timeval tv = ast_tvnow();
int msec;
@ -58,12 +59,13 @@ static int waituntil_exec(struct ast_channel *chan, void *data)
return 0;
}
if (sscanf(data, "%30ld%30lf", (long *)&future.tv_sec, &fraction) == 0) {
if (sscanf(data, "%30ld%30lf", &seconds, &fraction) == 0) {
ast_log(LOG_WARNING, "WaitUntil called with non-numeric argument\n");
pbx_builtin_setvar_helper(chan, "WAITUNTILSTATUS", "FAILURE");
return 0;
}
future.tv_sec = seconds;
future.tv_usec = fraction * 1000000;
if ((msec = ast_tvdiff_ms(future, tv)) < 0) {

@ -3730,7 +3730,7 @@ static char *handle_parkedcalls(struct ast_cli_entry *e, int cmd, struct ast_cli
AST_LIST_TRAVERSE(&parkinglot, cur, list) {
ast_cli(a->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++;
}

@ -1094,11 +1094,7 @@ void ast_backtrace(void)
if ((strings = backtrace_symbols(addresses, count))) {
ast_debug(1, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
for (i = 0; i < count; i++) {
#if __WORDSIZE == 32
ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
#elif __WORDSIZE == 64
ast_log(LOG_DEBUG, "#%d: [%016lX] %s\n", i, (unsigned long)addresses[i], strings[i]);
#endif
ast_log(LOG_DEBUG, "#%d: [%p] %s\n", i, addresses[i], strings[i]);
}
free(strings);
} else {

@ -3099,7 +3099,7 @@ int __manager_event(int category, const char *event,
now = ast_tvnow();
ast_str_append(&buf, 0,
"Timestamp: %ld.%06lu\r\n",
now.tv_sec, (unsigned long) now.tv_usec);
(long) now.tv_sec, (unsigned long) now.tv_usec);
}
if (manager_debug) {
static int seq;

@ -323,7 +323,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_debug(1, "=============================================================\n");

Loading…
Cancel
Save