Permalink
Browse files

Merge branch 'cabal-1.16'

  • Loading branch information...
2 parents 68d403c + e9c9b7a commit 5166dbc27ffe62d638a607aa4edbecca364c15d9 @tibbe tibbe committed Sep 20, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 cabal-install/Distribution/Client/BuildReports/Upload.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE CPP, PatternGuards #-}
-- This is a quick hack for uploading build reports to Hackage.
module Distribution.Client.BuildReports.Upload
@@ -51,7 +51,11 @@ postBuildReport uri buildReport = do
}
case rspCode response of
(3,0,3) | [Just buildId] <- [ do rel <- parseRelativeReference location
+#if MIN_VERSION_network(2,4,0)
+ return $ relativeTo rel uri
+#else
relativeTo rel uri
+#endif
| Header HdrLocation location <- rspHeaders response ]
-> return $ buildId
_ -> error "Unrecognised response from server."

0 comments on commit 5166dbc

Please sign in to comment.