Subject: Re: pkg/34720
To: None <rillig@NetBSD.org, gnats-admin@netbsd.org,>
From: Roland Illig <rillig@NetBSD.org>
List: pkgsrc-bugs
Date: 12/20/2006 04:10:03
The following reply was made to PR pkg/34720; it has been noted by GNATS.

From: Roland Illig <rillig@NetBSD.org>
To: Jeffrey Bedard <antiright@gmail.com>
Cc: gnats-bugs@netbsd.org, michael.grunditz@telia.com
Subject: Re: pkg/34720
Date: Wed, 20 Dec 2006 05:08:12 +0100

 Jeffrey Bedard wrote:
 > This PR is a duplicate of 34546.  Attached is a patch that fixes the
 > compilation problems.
 > Regards,
 > Jeff Bedard
 > 
 > 
 > ------------------------------------------------------------------------
 > 
 > --- FileLogger.cpp.orig	2006-12-19 19:57:22.000000000 -0500
 > +++ FileLogger.cpp	2006-12-19 19:58:31.000000000 -0500
 > @@ -511,7 +511,7 @@
 >      szTimeLine = ctime(&(sTimeBuffer.time));
 >  #else
 >      gettimeofday(&sTimeBuffer, &sTimezoneBuffer);
 > -    szTimeLine = ctime(&(sTimeBuffer.tv_sec));
 > +    szTimeLine = ctime((const time_t*)&(sTimeBuffer.tv_sec));
 
 I don't like this patch, as it will not work on big endian 64-bit 
 platforms. The proper way to fix this problem is to introduce a 
 temporary variable of type time_t and to copy its value.
 
 You're right that it fixes the compilation problems, but it introduces 
 run-time problems, which are much harder to find.
 
 Roland