aboutsummaryrefslogtreecommitdiff
path: root/Utility/SRV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:49:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:49:14 -0400
commit7204a6774d81b681be9ea4733596dd58a05906b1 (patch)
tree91abc35dee2ec1227922a8a3d1c1f7fec928d24c /Utility/SRV.hs
parentbfad6f5a7d156d5ddf0e5cf3840d8d22f82a2377 (diff)
Drop support for building with old versions of dns and http-conduit.
Diffstat (limited to 'Utility/SRV.hs')
-rw-r--r--Utility/SRV.hs9
1 files changed, 1 insertions, 8 deletions
diff --git a/Utility/SRV.hs b/Utility/SRV.hs
index 033064a27..64cca6060 100644
--- a/Utility/SRV.hs
+++ b/Utility/SRV.hs
@@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
-{-# LANGUAGE CPP #-}
-
module Utility.SRV (
mkSRVTcp,
mkSRV,
@@ -42,12 +40,7 @@ lookupSRV :: SRV -> IO [HostPort]
lookupSRV (SRV srv) = do
seed <- makeResolvSeed defaultResolvConf
r <- withResolver seed $ flip DNS.lookupSRV $ B8.fromString srv
- return $
-#if MIN_VERSION_dns(1,0,0)
- either (const []) use r
-#else
- maybe [] use r
-#endif
+ return $ either (const []) use r
where
use = orderHosts . map tohosts
tohosts (priority, weight, port, hostname) =