From 1339e9b3bc3edb8c87c8212a546099f6f2bb529b Mon Sep 17 00:00:00 2001 From: stolz Date: Fri, 10 Sep 2004 08:29:14 +0000 Subject: [PATCH] [project @ 2004-09-10 08:29:14 by stolz] Fix build on Solaris: CTime is no longer an instance of Integral, so do the realToInteger-dance. --- System/Time.hsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/System/Time.hsc b/System/Time.hsc index ec1c2b8..6b59353 100644 --- a/System/Time.hsc +++ b/System/Time.hsc @@ -377,7 +377,8 @@ foreign import ccall "&timezone" timezone :: Ptr CTime gmtoff x = do dst <- (#peek struct tm,tm_isdst) x tz <- if dst then peek altzone else peek timezone - return (-fromIntegral tz) + let realToInteger = round . realToFrac :: Real a => a -> Integer + return (-fromIntegral (realToInteger tz)) # else /* ! HAVE_DECL_ALTZONE */ #if !defined(mingw32_TARGET_OS) -- 1.7.10.4