[asterisk-commits] tilghman: trunk r93041 - /trunk/apps/app_meetme.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 14 12:24:12 CST 2007
Author: tilghman
Date: Fri Dec 14 12:24:12 2007
New Revision: 93041
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93041
Log:
gcc 4.1.3 wants a union used here.
Modified:
trunk/apps/app_meetme.c
Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=93041&r1=93040&r2=93041
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Fri Dec 14 12:24:12 2007
@@ -2738,13 +2738,19 @@
} 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;
More information about the asterisk-commits
mailing list