From 101a43965a520eb5acd2aa0d7fa213b4ba2256c0 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Fri, 10 Nov 2006 20:35:56 +0000 Subject: [PATCH] Added support for HAVE_CTIME_R_3 git-svn: trunk@2498 --- clamav-devel/clamav-milter/clamav-milter.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/clamav-devel/clamav-milter/clamav-milter.c b/clamav-devel/clamav-milter/clamav-milter.c index e56465e3d..9919057ee 100644 --- a/clamav-devel/clamav-milter/clamav-milter.c +++ b/clamav-devel/clamav-milter/clamav-milter.c @@ -24,9 +24,9 @@ * * For installation instructions see the file INSTALL that came with this file */ -static char const rcsid[] = "$Id: clamav-milter.c,v 1.297 2006/11/05 09:56:41 njh Exp $"; +static char const rcsid[] = "$Id: clamav-milter.c,v 1.298 2006/11/10 20:35:56 njh Exp $"; -#define CM_VERSION "devel-051106" +#define CM_VERSION "devel-101106" #if HAVE_CONFIG_H #include "clamav-config.h" @@ -5266,12 +5266,18 @@ loadDatabase(void) if(d) { char *ptr; time_t t = d->stime; -#ifdef HAVE_CTIME_R_2 +#ifdef HAVE_CTIME_R char buf[26]; +#ifdef HAVE_CTIME_R_2 snprintf(clamav_version, VERSION_LENGTH, "ClamAV %s/%d/%s", VERSION, d->version, ctime_r(&t, buf)); +#else + snprintf(clamav_version, VERSION_LENGTH, + "ClamAV %s/%d/%s", VERSION, d->version, + ctime_r(&t, buf, sizeof(buf))); +#endif #else snprintf(clamav_version, VERSION_LENGTH, "ClamAV %s/%d/%s", VERSION, d->version, ctime(&t));