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 0214b3233..5eea4704b 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/main/features.c b/main/features.c index f48982c6b..e67e2cd94 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 f14a646c6..6039761a5 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" |