git-annex/standalone/android/haskell-patches/network_2.4.1.0_0003-configure-misdetects-accept4.patch
2015-07-02 23:03:34 -04:00

34 lines
1.2 KiB
Diff

From 21af25e922b00171c07f951a235ff7d7edbbd2be Mon Sep 17 00:00:00 2001
From: dummy <dummy@example.com>
Date: Thu, 2 Jul 2015 20:14:40 +0000
Subject: [PATCH] avoid accept4
---
Network/Socket.hsc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
index 6553bfc..802a7e9 100644
--- a/Network/Socket.hsc
+++ b/Network/Socket.hsc
@@ -489,7 +489,7 @@ accept sock@(MkSocket s family stype protocol status) = do
return new_sock
#else
with (fromIntegral sz) $ \ ptr_len -> do
-# ifdef HAVE_ACCEPT4
+#if 0
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
(threadWaitRead (fromIntegral s))
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
@@ -1565,7 +1565,7 @@ foreign import CALLCONV SAFE_ON_WIN "connect"
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
foreign import CALLCONV unsafe "accept"
c_accept :: CInt -> Ptr SockAddr -> Ptr 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
#endif
--
2.1.4