diff --git a/.travis.yml b/.travis.yml index 92f1928..31e098b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,13 @@ -# language: haskell +sudo: required +language: c -# See http://www.reddit.com/r/haskell/comments/1os3f6/how_to_use_travisci_with_multiple_ghc_versions/ +os: linux +dist: xenial env: - GHCVER=7.10.3 - - GHCVER=8.0.1 - - GHCVER=8.2.1 + - GHCVER=8.0.2 + - GHCVER=8.2.2 before_install: - sudo add-apt-repository -y ppa:hvr/ghc diff --git a/http-proxy.cabal b/http-proxy.cabal index 9b12a61..6855ce6 100644 --- a/http-proxy.cabal +++ b/http-proxy.cabal @@ -47,7 +47,7 @@ library , http-conduit >= 2.1.11 && < 2.2 , http-types >= 0.8 , mtl >= 2.1 - , network >= 2.6 + , network == 2.7.* , resourcet >= 1.1 -- Not used directly but necessary to enforce < 0.2 , streaming-commons >= 0.1 && < 0.2 diff --git a/test/Test/Util.hs b/test/Test/Util.hs index 6ad9790..0fe9a84 100644 --- a/test/Test/Util.hs +++ b/test/Test/Util.hs @@ -224,8 +224,9 @@ catchAny action onE = openLocalhostListenSocket :: IO (Socket, Port) openLocalhostListenSocket = do sock <- socket AF_INET Stream defaultProtocol - addr <- inet_addr "127.0.0.1" - bind sock (SockAddrInet aNY_PORT addr) + addr:_ <- getAddrInfo Nothing (Just "127.0.0.1") Nothing + bind sock (addrAddress addr) listen sock 10 port <- fromIntegral <$> socketPort sock return (sock, port) +