From d680ff7ef06a3b0c8310836b03446e89d0ff9764 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Jun 2012 20:33:27 +0000 Subject: kqueue code compiles on debian kfreebsd --- Assistant/Watcher.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Assistant/Watcher.hs') diff --git a/Assistant/Watcher.hs b/Assistant/Watcher.hs index 52c3780ab..13c27d080 100644 --- a/Assistant/Watcher.hs +++ b/Assistant/Watcher.hs @@ -84,10 +84,12 @@ watchThread st dstatus changechan = withINotify $ \i -> do } #else #ifdef WITH_KQUEUE -watchThread st dstatus changechan = forever $ do +watchThread st dstatus changechan = do dirs <- scanRecursive "." ignored - changeddir <- waitChange dirs - print $ "detected a change in " ++ show changeddir + kqueue <- initKqueue dirs + forever $ do + changeddir <- waitChange kqueue + print $ "detected a change in " ++ show changeddir #else watchThread = undefined #endif /* WITH_KQUEUE */ -- cgit v1.2.3