[Git][haskell-team/DHG_packages][master] io-streams-haproxy: Patch to fix wrong socket_type on mips
Ilias Tsitsimpis
gitlab at salsa.debian.org
Sat Oct 19 16:56:05 BST 2019
Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
b69d6af3 by Ilias Tsitsimpis at 2019-10-19T15:23:41Z
io-streams-haproxy: Patch to fix wrong socket_type on mips
- - - - -
3 changed files:
- p/haskell-io-streams-haproxy/debian/changelog
- + p/haskell-io-streams-haproxy/debian/patches/fix-mips
- + p/haskell-io-streams-haproxy/debian/patches/series
Changes:
=====================================
p/haskell-io-streams-haproxy/debian/changelog
=====================================
@@ -1,3 +1,9 @@
+haskell-io-streams-haproxy (1.0.1.0-2) unstable; urgency=medium
+
+ * Patch to fix wrong socket_type on mips
+
+ -- Ilias Tsitsimpis <iliastsi at 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.
=====================================
p/haskell-io-streams-haproxy/debian/patches/fix-mips
=====================================
@@ -0,0 +1,43 @@
+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 at 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,0 +1 @@
+fix-mips
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/commit/b69d6af3f9cc5af3886f04040cb439fa4f49c6a5
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/commit/b69d6af3f9cc5af3886f04040cb439fa4f49c6a5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20191019/2064c5ab/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list