diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-08-17 11:00:48 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-08-17 11:00:48 -0400 |
commit | 1fe450e89a914bb40ad1efa53fc15b881c686544 (patch) | |
tree | 6931e4cad0818d9e50d6bc9b48030815e09cf677 | |
parent | 8e8e2171249208bc01a5b01b126329aae8d885af (diff) |
fix build with old http-client versions
-rw-r--r-- | Remote/S3.hs | 9 | ||||
-rw-r--r-- | Utility/Url.hs | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 2d2819824..c05831b0b 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -23,7 +23,7 @@ import qualified Data.Map as M import Data.Char import Network.Socket (HostName) import Network.HTTP.Conduit (Manager, newManager) -import Network.HTTP.Client (managerResponseTimeout, responseStatus, responseBody, RequestBody(..)) +import Network.HTTP.Client (responseStatus, responseBody, RequestBody(..)) import Network.HTTP.Types import Control.Monad.Trans.Resource import Control.Monad.Catch @@ -50,13 +50,6 @@ import Annex.Content import Annex.Url (withUrlOptions) import Utility.Url (checkBoth, managerSettings, closeManager) -#if MIN_VERSION_http_client(0,5,0) -import Network.HTTP.Client (responseTimeoutNone) -#else -responseTimeoutNone :: Maybe Int -responseTimeoutNone = Nothing -#endif - type BucketName = String remote :: RemoteType diff --git a/Utility/Url.hs b/Utility/Url.hs index d49953c55..e1a21af5d 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -50,6 +50,11 @@ closeManager :: Manager -> IO () closeManager _ = return () #endif +#if ! MIN_VERSION_http_client(0,5,0) +responseTimeoutNone :: Maybe Int +responseTimeoutNone = Nothing +#endif + managerSettings :: ManagerSettings #if MIN_VERSION_http_conduit(2,1,7) managerSettings = tlsManagerSettings |