fix build

This commit is contained in:
Joey Hess 2012-06-19 01:52:07 +00:00
parent 5e9fdac92f
commit 3d163f5ff9

View file

@ -34,7 +34,7 @@ import Utility.Inotify
import System.INotify import System.INotify
#endif #endif
#ifdef WITH_KQUEUE #ifdef WITH_KQUEUE
import Utility.Kqueue import qualified Utility.Kqueue as Kqueue
#endif #endif
checkCanWatch :: Annex () checkCanWatch :: Annex ()
@ -84,12 +84,12 @@ watchThread st dstatus changechan = withINotify $ \i -> do
} }
#else #else
#ifdef WITH_KQUEUE #ifdef WITH_KQUEUE
watchThread st dstatus changechan = do watchThread st dstatus changechan = go =<< Kqueue.initKqueue "." ignored
dirs <- scanRecursive "." ignored where
kqueue <- initKqueue dirs go kq = do
forever $ do (kq', changes) <- Kqueue.waitChange kq
changeddir <- waitChange kqueue print $ "detected a change in " ++ show changes
print $ "detected a change in " ++ show changeddir go kq'
#else #else
watchThread = undefined watchThread = undefined
#endif /* WITH_KQUEUE */ #endif /* WITH_KQUEUE */