summaryrefslogtreecommitdiff
path: root/standalone/windows/haskell-patches/MissingH_1.2.0.0-0001-hack-around-strange-build-problem-in-jenkins-autobui.patch
blob: be18ff23f6c8cda05865c98c73468b62f47f774a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 93876dea5befa576c1324e25dcf2135ae1705427 Mon Sep 17 00:00:00 2001
From: Joey Hess <joey@kitenet.net>
Date: Fri, 17 May 2013 13:04:56 -0400
Subject: [PATCH] hack around strange build problem in jenkins autobuilder

src\System\IO\WindowsCompat.hs:123:41:
    Couldn't match expected type `System.Time.ClockTime'
                with actual type `time-1.4:Data.Time.Clock.UTC.UTCTime'
    In the first argument of `clockTimeToEpoch', namely `modct'
    In the expression: clockTimeToEpoch modct
    In an equation for `epochtime': epochtime = clockTimeToEpoch modct

But it works on Windows here..
---
 src/System/IO/WindowsCompat.hs | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/System/IO/WindowsCompat.hs b/src/System/IO/WindowsCompat.hs
index 473490d..0eea21b 100644
--- a/src/System/IO/WindowsCompat.hs
+++ b/src/System/IO/WindowsCompat.hs
@@ -120,8 +119,10 @@ getFileStatus fp =
     do isfile <- doesFileExist fp
        isdir <- doesDirectoryExist fp
        perms <- getPermissions fp
+       {-
        modct <- getModificationTime fp
-       let epochtime = clockTimeToEpoch modct
+       let epochtime = clockTimeToEpoch $ modct
+       -}
        return $ FileStatusCompat {deviceID = -1,
                                   fileID = -1,
                                   fileMode = if isfile then regularFileMode
@@ -131,8 +132,8 @@ getFileStatus fp =
                                   fileGroup = 0,
                                   specialDeviceID = -1,
                                   fileSize = 0, -- fixme: hFileSize?
-                                  accessTime = fromInteger epochtime,
-                                  modificationTime = fromInteger epochtime,
-                                  statusChangeTime = fromInteger epochtime
+                                  accessTime = undefined, -- fromInteger epochtime,
+                                  modificationTime = undefined, -- fromInteger epochtime,
+                                  statusChangeTime = undefined -- fromInteger epochtime
                                  }
 #endif
-- 
1.8.3.rc1