Fix build on FreeBSD
This must have been broken for years.. This commit was sponsored by Jack Hill on Patreon.
This commit is contained in:
parent
084e88964d
commit
f54c72d2e1
4 changed files with 17 additions and 3 deletions
|
@ -24,6 +24,7 @@ git-annex (6.20180808) UNRELEASED; urgency=medium
|
||||||
bundled locales. It can be set to an empty string to use the system
|
bundled locales. It can be set to an empty string to use the system
|
||||||
locales too.
|
locales too.
|
||||||
* Stop using external hash programs, since cryptonite is faster.
|
* Stop using external hash programs, since cryptonite is faster.
|
||||||
|
* Fix build on FreeBSD.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 08 Aug 2018 11:24:08 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 08 Aug 2018 11:24:08 -0400
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ scanRecursive topdir prune = M.fromList <$> walk [] [topdir]
|
||||||
Nothing -> walk c rest
|
Nothing -> walk c rest
|
||||||
Just info -> do
|
Just info -> do
|
||||||
mfd <- catchMaybeIO $
|
mfd <- catchMaybeIO $
|
||||||
openFd dir ReadOnly Nothing defaultFileFlags
|
Files.openFd dir Files.ReadOnly Nothing Files.defaultFileFlags
|
||||||
case mfd of
|
case mfd of
|
||||||
Nothing -> walk c rest
|
Nothing -> walk c rest
|
||||||
Just fd -> do
|
Just fd -> do
|
||||||
|
@ -129,7 +129,7 @@ addSubDirs dirmap prune dirs = do
|
||||||
{- Removes a subdirectory (and all its children) from a directory map. -}
|
{- Removes a subdirectory (and all its children) from a directory map. -}
|
||||||
removeSubDir :: DirMap -> FilePath -> IO DirMap
|
removeSubDir :: DirMap -> FilePath -> IO DirMap
|
||||||
removeSubDir dirmap dir = do
|
removeSubDir dirmap dir = do
|
||||||
mapM_ closeFd $ M.keys toremove
|
mapM_ Files.closeFd $ M.keys toremove
|
||||||
return rest
|
return rest
|
||||||
where
|
where
|
||||||
(toremove, rest) = M.partition (dirContains dir . dirName) dirmap
|
(toremove, rest) = M.partition (dirContains dir . dirName) dirmap
|
||||||
|
@ -167,7 +167,7 @@ updateKqueue (Kqueue h _ dirmap _) =
|
||||||
{- Stops a Kqueue. Note: Does not directly close the Fds in the dirmap,
|
{- Stops a Kqueue. Note: Does not directly close the Fds in the dirmap,
|
||||||
- so it can be reused. -}
|
- so it can be reused. -}
|
||||||
stopKqueue :: Kqueue -> IO ()
|
stopKqueue :: Kqueue -> IO ()
|
||||||
stopKqueue = closeFd . kqueueFd
|
stopKqueue = Files.closeFd . kqueueFd
|
||||||
|
|
||||||
{- Waits for a change on a Kqueue.
|
{- Waits for a change on a Kqueue.
|
||||||
- May update the Kqueue.
|
- May update the Kqueue.
|
||||||
|
|
|
@ -47,3 +47,5 @@ Compilation failure is as follows:
|
||||||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||||
|
|
||||||
Not yet. But I'm used to issues compiling new tools on FreeBSD, so I'm in no way disheartened by this :)
|
Not yet. But I'm used to issues compiling new tools on FreeBSD, so I'm in no way disheartened by this :)
|
||||||
|
|
||||||
|
> [[done]] --[[Joey]]
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 1"""
|
||||||
|
date="2018-08-29T16:07:48Z"
|
||||||
|
content="""
|
||||||
|
I've fixed those problems.
|
||||||
|
|
||||||
|
It looks like noone has compiled on FreeBSD in a long time. Maybe since I
|
||||||
|
first developed that module in 2013. So there may be other problems. Please
|
||||||
|
open bugs if so.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue