diff options
-rw-r--r-- | Command/EnableTor.hs | 2 | ||||
-rw-r--r-- | Utility/Shell.hs | 3 | ||||
-rw-r--r-- | Utility/Su.hs | 2 | ||||
-rw-r--r-- | Utility/UserInfo.hs | 9 | ||||
-rw-r--r-- | Utility/WebApp.hs | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/Command/EnableTor.hs b/Command/EnableTor.hs index 7af627725..7076a9a73 100644 --- a/Command/EnableTor.hs +++ b/Command/EnableTor.hs @@ -15,7 +15,9 @@ import P2P.Address import P2P.Annex import Utility.Tor import Annex.UUID +#ifndef mingw32_HOST_OS import Config.Files +#endif import P2P.IO import qualified P2P.Protocol as P2P import Utility.ThreadScheduler diff --git a/Utility/Shell.hs b/Utility/Shell.hs index b8a9491dc..c64ca75b9 100644 --- a/Utility/Shell.hs +++ b/Utility/Shell.hs @@ -12,14 +12,11 @@ module Utility.Shell where import Utility.SafeCommand #ifdef mingw32_HOST_OS import Utility.Path -import Utility.FileSystemEncoding import Utility.Exception import Utility.PartialPrelude -import Utility.Applicative #endif #ifdef mingw32_HOST_OS -import System.IO import System.FilePath #endif diff --git a/Utility/Su.hs b/Utility/Su.hs index f1afd5414..84ea4c5da 100644 --- a/Utility/Su.hs +++ b/Utility/Su.hs @@ -10,9 +10,9 @@ module Utility.Su where import Common -import Utility.Env #ifndef mingw32_HOST_OS +import Utility.Env import System.Posix.Terminal #endif diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs index dd66c331e..d504fa5c3 100644 --- a/Utility/UserInfo.hs +++ b/Utility/UserInfo.hs @@ -15,11 +15,13 @@ module Utility.UserInfo ( ) where import Utility.Env -import Utility.Data import Utility.Exception +#ifndef mingw32_HOST_OS +import Utility.Data +import Control.Applicative +#endif import System.PosixCompat -import Control.Applicative import Prelude {- Current user's home directory. @@ -58,6 +60,7 @@ myVal envvars extract = go envvars #ifndef mingw32_HOST_OS go [] = Right . extract <$> (getUserEntryForID =<< getEffectiveUserID) #else - go [] = return $ Left ("environment not set: " ++ show envvars) + go [] = return $ either Left (Right . extract) $ + Left ("environment not set: " ++ show envvars) #endif go (v:vs) = maybe (go vs) (return . Right) =<< getEnv v diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index a00a5caf2..6fc154329 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -105,7 +105,7 @@ getSocket h = do addr <- inet_addr "127.0.0.1" sock <- socket AF_INET Stream defaultProtocol preparesocket sock - bindSocket sock (SockAddrInet aNY_PORT addr) + bind sock (SockAddrInet aNY_PORT addr) use sock where #else |