diff options
-rw-r--r-- | Utility/SRV.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Utility/SRV.hs b/Utility/SRV.hs index d9c70321b..c43782a56 100644 --- a/Utility/SRV.hs +++ b/Utility/SRV.hs @@ -31,12 +31,14 @@ import Data.Maybe import ADNS.Resolver import Data.Either #else +#ifndef WITH_HOST #ifdef WITH_DNS import qualified Network.DNS.Lookup as DNS import Network.DNS.Resolver import qualified Data.ByteString.UTF8 as B8 #endif #endif +#endif newtype SRV = SRV String deriving (Show, Eq) @@ -62,6 +64,9 @@ lookupSRV (SRV srv) = initResolver [] $ \resolver -> do resolveSRV resolver srv return $ either (\_ -> []) id r #else +#ifdef WITH_HOST +lookupSRV = lookupSRVHost +#else #ifdef WITH_DNS lookupSRV (SRV srv) = do seed <- makeResolvSeed defaultResolvConf @@ -78,6 +83,7 @@ lookupSRV (SRV srv) = do lookupSRV = lookupSRVHost #endif #endif +#endif lookupSRVHost :: SRV -> IO [HostPort] lookupSRVHost (SRV srv) |