Portability fix for devmode compiling (closes bug #10382)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-08-05 14:18:00 +00:00
parent 38a51a53db
commit 34f8812c64

View File

@@ -71,13 +71,14 @@ static PGconn *conn = NULL;
static int pgsql_log(struct ast_cdr *cdr)
{
struct tm tm;
time_t t = cdr->start.tv_sec;
char sqlcmd[2048] = "", timestr[128];
char *pgerror;
PGresult *result;
ast_mutex_lock(&pgsql_lock);
ast_localtime(&cdr->start.tv_sec, &tm, NULL);
ast_localtime(&t, &tm, NULL);
strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm);
if ((!connected) && pghostname && pgdbuser && pgpassword && pgdbname) {