fix build with unix-2.8.0

Changed the parameters to openFd. So needed to add a small wrapper
library to keep supporting older versions as well.
This commit is contained in:
Joey Hess 2023-08-01 18:41:27 -04:00
parent 4ef16f53ed
commit 68c9b08faf
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 51 additions and 16 deletions

View file

@ -14,6 +14,7 @@ import RemoteDaemon.Core
import Utility.Daemon
#ifndef mingw32_HOST_OS
import Annex.Path
import Utility.OpenFd
#endif
cmd :: Command
@ -30,7 +31,7 @@ run o
#ifndef mingw32_HOST_OS
git_annex <- liftIO programPath
ps <- gitAnnexDaemonizeParams
let logfd = openFd "/dev/null" ReadOnly Nothing defaultFileFlags
let logfd = openFdWithMode (toRawFilePath "/dev/null") ReadOnly Nothing defaultFileFlags
liftIO $ daemonize git_annex ps logfd Nothing False runNonInteractive
#else
liftIO $ foreground Nothing runNonInteractive