fix build of patched network
This commit is contained in:
parent
b411d6c412
commit
abb14f529e
2 changed files with 15 additions and 6 deletions
|
@ -1,14 +1,14 @@
|
||||||
From a6fb84e676bc13a248baf9f617fc3e84ef902111 Mon Sep 17 00:00:00 2001
|
From 44482ab1b3c0a136ad6e7b85a0d7fa9bae726883 Mon Sep 17 00:00:00 2001
|
||||||
From: Joey Hess <joeyh@joeyh.name>
|
From: Joey Hess <joeyh@joeyh.name>
|
||||||
Date: Tue, 21 Nov 2017 13:10:35 -0400
|
Date: Tue, 21 Nov 2017 13:10:35 -0400
|
||||||
Subject: [PATCH] disable use of accept4, for compatability with older systems
|
Subject: [PATCH] disable use of accept4, for compatability with older systems
|
||||||
|
|
||||||
---
|
---
|
||||||
Network/Socket.hsc | 2 +-
|
Network/Socket.hsc | 4 ++--
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
|
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
|
||||||
index 6a1ce6a..ef4004e 100644
|
index 6a1ce6a..668bbdf 100644
|
||||||
--- a/Network/Socket.hsc
|
--- a/Network/Socket.hsc
|
||||||
+++ b/Network/Socket.hsc
|
+++ b/Network/Socket.hsc
|
||||||
@@ -535,7 +535,7 @@ accept sock@(MkSocket s family stype protocol status) = do
|
@@ -535,7 +535,7 @@ accept sock@(MkSocket s family stype protocol status) = do
|
||||||
|
@ -20,6 +20,15 @@ index 6a1ce6a..ef4004e 100644
|
||||||
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "Network.Socket.accept"
|
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "Network.Socket.accept"
|
||||||
(threadWaitRead (fromIntegral s))
|
(threadWaitRead (fromIntegral s))
|
||||||
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
|
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
|
||||||
|
@@ -1591,7 +1591,7 @@ foreign import CALLCONV unsafe "bind"
|
||||||
|
c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
||||||
|
foreign import CALLCONV SAFE_ON_WIN "connect"
|
||||||
|
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
||||||
|
-#ifdef HAVE_ACCEPT4
|
||||||
|
+#if 0
|
||||||
|
foreign import CALLCONV unsafe "accept4"
|
||||||
|
c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
|
||||||
|
#else
|
||||||
--
|
--
|
||||||
2.15.0
|
2.15.0
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ fi
|
||||||
cabalopts="$@"
|
cabalopts="$@"
|
||||||
|
|
||||||
cabalinstall () {
|
cabalinstall () {
|
||||||
echo cabal install -j1 "$@" "$cabalopts"
|
echo cabal install -j1 "$@" "$cabalopts" --force-reinstalls
|
||||||
eval cabal install -j1 "$@" "$cabalopts"
|
eval cabal install -j1 "$@" "$cabalopts" --force-reinstalls
|
||||||
}
|
}
|
||||||
|
|
||||||
patched () {
|
patched () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue