avoid some warnings when built w/o dbus

This commit is contained in:
Joey Hess 2012-09-29 16:09:07 -04:00
parent efb96f9153
commit 74a6e8ff60
2 changed files with 5 additions and 6 deletions

View file

@ -22,8 +22,6 @@ import Utility.Mounts
import Remote.List import Remote.List
import qualified Types.Remote as Remote import qualified Types.Remote as Remote
import Control.Concurrent
import qualified Control.Exception as E
import qualified Data.Set as S import qualified Data.Set as S
#if WITH_DBUS #if WITH_DBUS
@ -31,6 +29,8 @@ import Utility.DBus
import DBus.Client import DBus.Client
import DBus import DBus
import Data.Word (Word32) import Data.Word (Word32)
import Control.Concurrent
import qualified Control.Exception as E
#else #else
#warning Building without dbus support; will use mtab polling #warning Building without dbus support; will use mtab polling
#endif #endif

View file

@ -19,13 +19,12 @@ import Utility.ThreadScheduler
import Remote.List import Remote.List
import qualified Types.Remote as Remote import qualified Types.Remote as Remote
import qualified Control.Exception as E
#if WITH_DBUS #if WITH_DBUS
import Utility.DBus import Utility.DBus
import DBus.Client import DBus.Client
import DBus import DBus
import Data.Word (Word32) import Data.Word (Word32)
import qualified Control.Exception as E
#else #else
#warning Building without dbus support; will poll for network connection changes #warning Building without dbus support; will poll for network connection changes
#endif #endif
@ -34,11 +33,11 @@ thisThread :: ThreadName
thisThread = "NetWatcher" thisThread = "NetWatcher"
netWatcherThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> NamedThread netWatcherThread :: ThreadState -> DaemonStatusHandle -> ScanRemoteMap -> NamedThread
netWatcherThread st dstatus scanremotes = thread $
#if WITH_DBUS #if WITH_DBUS
netWatcherThread st dstatus scanremotes = thread $
dbusThread st dstatus scanremotes dbusThread st dstatus scanremotes
#else #else
noop netWatcherThread _ _ _ = thread noop
#endif #endif
where where
thread = NamedThread thisThread thread = NamedThread thisThread