diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-07 14:59:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-07 14:59:39 -0400 |
commit | 01d8328f144de7791a279d0854986ce32a9f7fee (patch) | |
tree | 4eddd7afac8c5d51917e5f0632fb94feabcef56b /standalone | |
parent | 4f963acb33687df7a55f92baa19108fc9df85eac (diff) |
add patch, should fix some network issues
Diffstat (limited to 'standalone')
-rw-r--r-- | standalone/android/haskell-patches/network-2.4.1.0_0004-getprotobyname-hack-for-tcp-and-udp.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/standalone/android/haskell-patches/network-2.4.1.0_0004-getprotobyname-hack-for-tcp-and-udp.patch b/standalone/android/haskell-patches/network-2.4.1.0_0004-getprotobyname-hack-for-tcp-and-udp.patch new file mode 100644 index 000000000..4cc22cbca --- /dev/null +++ b/standalone/android/haskell-patches/network-2.4.1.0_0004-getprotobyname-hack-for-tcp-and-udp.patch @@ -0,0 +1,28 @@ +From b1a581007759e2d9e53ef776e4f10d1de87b8377 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joey@kitenet.net> +Date: Tue, 7 May 2013 14:51:09 -0400 +Subject: [PATCH] getprotobyname hack for tcp and udp + +Otherwise, core network stuff fails to get the numbers for these protocols. +--- + Network/BSD.hsc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Network/BSD.hsc b/Network/BSD.hsc +index f0c9f5b..a289143 100644 +--- a/Network/BSD.hsc ++++ b/Network/BSD.hsc +@@ -259,6 +259,10 @@ instance Storable ProtocolEntry where + poke _p = error "Storable.poke(BSD.ProtocolEntry) not implemented" + + getProtocolByName :: ProtocolName -> IO ProtocolEntry ++getProtocolByName "tcp" = return $ ++ ProtocolEntry {protoName = "tcp", protoAliases = ["TCP"], protoNumber = 6} ++getProtocolByName "udp" = return $ ++ ProtocolEntry {protoName = "udp", protoAliases = ["UDP"], protoNumber = 17} + getProtocolByName name = withLock $ do + withCString name $ \ name_cstr -> do + throwNoSuchThingIfNull "getProtocolByName" ("no such protocol name: " ++ name) +-- +1.8.2.rc3 + |