From 3a6456a7b786e1cb41605a1ad46004e4de6d27b7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Nov 2012 18:05:01 -0400 Subject: use cabal macro to detect if old version of network is being used --- Utility/Url.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Utility/Url.hs') diff --git a/Utility/Url.hs b/Utility/Url.hs index 4e152159a..e47cb9dee 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -119,6 +119,11 @@ request url headers requesttype = go 5 url Nothing -> return rsp Just newURI -> go n newURI_abs where +#if defined VERSION_network +#if ! MIN_VERSION_network(2,4,0) +#define WITH_OLD_URI +#endif +#endif #ifdef WITH_OLD_URI newURI_abs = fromMaybe newURI (newURI `relativeTo` u) #else -- cgit v1.2.3