Loading p/haskell-io-streams-haproxy/debian/changelog +6 −0 Original line number Diff line number Diff line haskell-io-streams-haproxy (1.0.1.0-2) unstable; urgency=medium * Patch to fix wrong socket_type on mips -- Ilias Tsitsimpis <iliastsi@debian.org> Sat, 19 Oct 2019 18:19:08 +0300 haskell-io-streams-haproxy (1.0.1.0-1) unstable; urgency=medium * New upstream version. Loading p/haskell-io-streams-haproxy/debian/patches/fix-mips 0 → 100644 +43 −0 Original line number Diff line number Diff line Description: Correctly retrieve the type of the socket On mips, `SOCK_STREAM` and `SOCK_DGRAM` have different values than on x86_64. Modify `getSockType` to use functions from the Network library to retrieve the type of the socket, instead of relying on hard-coded values. Author: Ilias Tsitsimpis <iliastsi@debian.org> Bug: https://github.com/snapframework/io-streams-haproxy/issues/18 Index: b/io-streams-haproxy.cabal =================================================================== --- a/io-streams-haproxy.cabal +++ b/io-streams-haproxy.cabal @@ -39,7 +39,7 @@ library attoparsec >= 0.7 && < 0.14, bytestring >= 0.9 && < 0.11, io-streams >= 1.3 && < 1.6, - network >= 2.3 && < 3.1, + network (>= 2.3 && < 3.0.0.0) || (>= 3.0.1.0 && < 3.2), transformers >= 0.3 && < 0.6 default-language: Haskell2010 Index: b/src/System/IO/Streams/Network/HAProxy.hs =================================================================== --- a/src/System/IO/Streams/Network/HAProxy.hs +++ b/src/System/IO/Streams/Network/HAProxy.hs @@ -72,15 +72,8 @@ socketToProxyInfo s sa = do !sty <- getSockType return $! makeProxyInfo sa da (addrFamily sa) sty where -#if MIN_VERSION_network(2,7,0) - getSockType = do - c <- N.getSocketOption s N.Type - -- This is a kludge until network has better support for returning - -- SocketType - case c of - 1 -> return N.Stream - 2 -> return N.Datagram - _ -> error ("bad socket type: " ++ show c) +#if MIN_VERSION_network(3,0,1) + getSockType = getSocketType s #else getSockType = let (N.MkSocket _ _ sty _ _) = s in return sty #endif p/haskell-io-streams-haproxy/debian/patches/series 0 → 100644 +1 −0 Original line number Diff line number Diff line fix-mips Loading
p/haskell-io-streams-haproxy/debian/changelog +6 −0 Original line number Diff line number Diff line haskell-io-streams-haproxy (1.0.1.0-2) unstable; urgency=medium * Patch to fix wrong socket_type on mips -- Ilias Tsitsimpis <iliastsi@debian.org> Sat, 19 Oct 2019 18:19:08 +0300 haskell-io-streams-haproxy (1.0.1.0-1) unstable; urgency=medium * New upstream version. Loading
p/haskell-io-streams-haproxy/debian/patches/fix-mips 0 → 100644 +43 −0 Original line number Diff line number Diff line Description: Correctly retrieve the type of the socket On mips, `SOCK_STREAM` and `SOCK_DGRAM` have different values than on x86_64. Modify `getSockType` to use functions from the Network library to retrieve the type of the socket, instead of relying on hard-coded values. Author: Ilias Tsitsimpis <iliastsi@debian.org> Bug: https://github.com/snapframework/io-streams-haproxy/issues/18 Index: b/io-streams-haproxy.cabal =================================================================== --- a/io-streams-haproxy.cabal +++ b/io-streams-haproxy.cabal @@ -39,7 +39,7 @@ library attoparsec >= 0.7 && < 0.14, bytestring >= 0.9 && < 0.11, io-streams >= 1.3 && < 1.6, - network >= 2.3 && < 3.1, + network (>= 2.3 && < 3.0.0.0) || (>= 3.0.1.0 && < 3.2), transformers >= 0.3 && < 0.6 default-language: Haskell2010 Index: b/src/System/IO/Streams/Network/HAProxy.hs =================================================================== --- a/src/System/IO/Streams/Network/HAProxy.hs +++ b/src/System/IO/Streams/Network/HAProxy.hs @@ -72,15 +72,8 @@ socketToProxyInfo s sa = do !sty <- getSockType return $! makeProxyInfo sa da (addrFamily sa) sty where -#if MIN_VERSION_network(2,7,0) - getSockType = do - c <- N.getSocketOption s N.Type - -- This is a kludge until network has better support for returning - -- SocketType - case c of - 1 -> return N.Stream - 2 -> return N.Datagram - _ -> error ("bad socket type: " ++ show c) +#if MIN_VERSION_network(3,0,1) + getSockType = getSocketType s #else getSockType = let (N.MkSocket _ _ sty _ _) = s in return sty #endif
p/haskell-io-streams-haproxy/debian/patches/series 0 → 100644 +1 −0 Original line number Diff line number Diff line fix-mips