]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Resolve 1.6.0 compilation issues on FreeBSD.
authorRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 18:29:46 +0000 (18:29 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 20 Mar 2010 18:29:46 +0000 (18:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@253630 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_waituntil.c
main/features.c
main/logger.c
main/manager.c
main/sched.c

index 0a42057bbfd2f316e05261bf7cd1d35a7f171c36..160c302a9681469a2fa78327fb827e03167aa47e 100644 (file)
@@ -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) {
index ea072b282733764fc91731ee63d013addbb826af..6e26fe7d9f0c9c22d06a86a73c45605d7eab89e7 100644 (file)
@@ -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++;
        }
index 42bc0d84eabf238d01314c613361b570d1b91bae..1e1b0ab4fc68619dc5edcec367102168fbf7aa13 100644 (file)
@@ -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 {
index 6eb05981f3eb35edf754bceddb77bf71556e6fea..ae5299e439bba03e74cae7544283e692878005cb 100644 (file)
@@ -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;
index 0d5968954b2211d00fc89257dff1be30e13c7284..e839ae20f473a0eb920e292a3ef3f5455902ab10 100644 (file)
@@ -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");