fix build
This commit is contained in:
parent
5e9fdac92f
commit
3d163f5ff9
1 changed files with 7 additions and 7 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue