fix build of patched network

This commit is contained in:
Joey Hess 2017-11-21 13:20:56 -04:00
parent b411d6c412
commit abb14f529e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 15 additions and 6 deletions

View file

@ -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>
Date: Tue, 21 Nov 2017 13:10:35 -0400
Subject: [PATCH] disable use of accept4, for compatability with older systems
---
Network/Socket.hsc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Network/Socket.hsc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
index 6a1ce6a..ef4004e 100644
index 6a1ce6a..668bbdf 100644
--- a/Network/Socket.hsc
+++ b/Network/Socket.hsc
@@ -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"
(threadWaitRead (fromIntegral s))
(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

View file

@ -17,8 +17,8 @@ fi
cabalopts="$@"
cabalinstall () {
echo cabal install -j1 "$@" "$cabalopts"
eval cabal install -j1 "$@" "$cabalopts"
echo cabal install -j1 "$@" "$cabalopts" --force-reinstalls
eval cabal install -j1 "$@" "$cabalopts" --force-reinstalls
}
patched () {