pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/34720
The following reply was made to PR pkg/34720; it has been noted by GNATS.
From: Roland Illig <rillig%NetBSD.org@localhost>
To: Jeffrey Bedard <antiright%gmail.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost, michael.grunditz%telia.com@localhost
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
Home |
Main Index |
Thread Index |
Old Index