summaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/Threads/NetWatcher.hs2
-rw-r--r--Assistant/Threads/SanityChecker.hs10
-rw-r--r--Assistant/Threads/Watcher.hs4
3 files changed, 11 insertions, 5 deletions
diff --git a/Assistant/Threads/NetWatcher.hs b/Assistant/Threads/NetWatcher.hs
index a7124fa01..0b009647c 100644
--- a/Assistant/Threads/NetWatcher.hs
+++ b/Assistant/Threads/NetWatcher.hs
@@ -24,8 +24,10 @@ import DBus
import Data.Word (Word32)
import Assistant.NetMessager
#else
+#ifdef linux_HOST_OS
#warning Building without dbus support; will poll for network connection changes
#endif
+#endif
netWatcherThread :: NamedThread
#if WITH_DBUS
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index b94d010e3..d7fe366e2 100644
--- a/Assistant/Threads/SanityChecker.hs
+++ b/Assistant/Threads/SanityChecker.hs
@@ -27,7 +27,6 @@ import qualified Git.Command
import qualified Git.Config
import Utility.ThreadScheduler
import qualified Assistant.Threads.Watcher as Watcher
-import Utility.LogFile
import Utility.Batch
import Utility.NotificationBroadcaster
import Config
@@ -43,6 +42,9 @@ import qualified Annex
#ifdef WITH_WEBAPP
import Assistant.WebApp.Types
#endif
+#ifndef mingw32_HOST_OS
+import Utility.LogFile
+#endif
import Data.Time.Clock.POSIX
import qualified Data.Text as T
@@ -214,10 +216,10 @@ checkLogSize n = do
checkLogSize $ n + 1
where
filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)
-#endif
-oneMegabyte :: Int
-oneMegabyte = 1000000
+ oneMegabyte :: Int
+ oneMegabyte = 1000000
+#endif
oneHour :: Int
oneHour = 60 * 60
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index 50a0efdd5..611eca1a7 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -23,7 +23,6 @@ import Assistant.Types.Changes
import Assistant.Alert
import Utility.DirWatcher
import Utility.DirWatcher.Types
-import qualified Utility.Lsof as Lsof
import qualified Annex
import qualified Annex.Queue
import qualified Git
@@ -40,6 +39,9 @@ import Annex.ReplaceFile
import Git.Types
import Config
import Utility.ThreadScheduler
+#ifndef mingw32_HOST_OS
+import qualified Utility.Lsof as Lsof
+#endif
import Data.Bits.Utils
import Data.Typeable