From f5a9e958d1c3b0244f01a88e82209d76b60c4bd3 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 14 Dec 2007 18:24:12 +0000 Subject: gcc 4.1.3 wants a union used here. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93041 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_meetme.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/app_meetme.c b/apps/app_meetme.c index c6ba632a4..5107b7f82 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2738,13 +2738,19 @@ static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char } else if (!strcasecmp(var->name, "adminopts")) { ast_copy_string(adminopts, var->value, sizeof(adminopts)); } else if (!strcasecmp(var->name, "endtime")) { - struct ast_tm tm = { 0, }; - strptime(var->value, "%Y-%m-%d %H:%M:%S", (struct tm *)&tm); - endtime = ast_mktime(&tm, NULL); + union { + struct ast_tm atm; + struct tm tm; + } t = { { 0, }, }; + strptime(var->value, "%Y-%m-%d %H:%M:%S", &t.tm); + endtime = ast_mktime(&t.atm, NULL); } else if (!strcasecmp(var->name, "starttime")) { - struct ast_tm tm = { 0, }; - strptime(var->value, "%Y-%m-%d %H:%M:%S", (struct tm *)&tm); - starttime = ast_mktime(&tm, NULL); + union { + struct ast_tm atm; + struct tm tm; + } t = { { 0, }, }; + strptime(var->value, "%Y-%m-%d %H:%M:%S", &t.tm); + starttime = ast_mktime(&t.atm, NULL); } var = var->next; -- cgit v1.2.3