diff options
-rw-r--r-- | cdr/cdr_pgsql.c | 6 | ||||
-rw-r--r-- | main/features.c | 1 | ||||
-rw-r--r-- | main/stdtime/localtime.c | 1 | ||||
-rw-r--r-- | main/tcptls.c | 1 |
4 files changed, 6 insertions, 3 deletions
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c index e32f6f4f8..bca0f863d 100644 --- a/cdr/cdr_pgsql.c +++ b/cdr/cdr_pgsql.c @@ -165,7 +165,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(13); - ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", cdr->start.tv_sec); + ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->start.tv_sec); } else if (strncmp(cur->type, "float", 5) == 0) { LENGTHEN_BUF2(31); ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->start.tv_sec + (double)cdr->start.tv_usec / 1000000.0); @@ -179,7 +179,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(13); - ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", cdr->answer.tv_sec); + ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->answer.tv_sec); } else if (strncmp(cur->type, "float", 5) == 0) { LENGTHEN_BUF2(31); ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->answer.tv_sec + (double)cdr->answer.tv_usec / 1000000.0); @@ -193,7 +193,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(13); - ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", cdr->end.tv_sec); + ast_str_append(&sql2, 0, "%s%ld", first ? "" : ",", (long) cdr->end.tv_sec); } else if (strncmp(cur->type, "float", 5) == 0) { LENGTHEN_BUF2(31); ast_str_append(&sql2, 0, "%s%f", first ? "" : ",", (double)cdr->end.tv_sec + (double)cdr->end.tv_usec / 1000000.0); diff --git a/main/features.c b/main/features.c index 29567241b..ecfd8eaf7 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 925ef029b..104ab09a3 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 d433facf5..6c84762d5 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" |