Ticket #269: patch-af.2

File patch-af.2, 1.0 KB (added by rillig, 11 years ago)
Line 
1$NetBSD$
2
3--- BSD.hsc.orig        2003-08-05 16:07:49.000000000 +0200
4+++ BSD.hsc     2004-11-03 07:59:17.000000000 +0100
5@@ -33,7 +33,7 @@
6     getHostByAddr,         -- :: HostAddress -> Family -> IO HostEntry
7     hostAddress,           -- :: HostEntry -> HostAddress
8 
9-#if !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS) && !defined(_WIN32)
10+#if defined(HAVE_GETHOSTENT) && !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS) && !defined(_WIN32)
11     setHostEntry,          -- :: Bool -> IO ()
12     getHostEntry,          -- :: IO HostEntry
13     endHostEntry,          -- :: IO ()
14@@ -382,7 +382,7 @@
15 foreign import ccall unsafe "gethostbyaddr"
16    c_gethostbyaddr :: Ptr HostAddress -> CInt -> CInt -> IO (Ptr HostEntry)
17 
18-#if !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS) && !defined(_WIN32)
19+#if defined(HAVE_GETHOSTENT) && !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS) && !defined(_WIN32)
20 getHostEntry :: IO HostEntry
21 getHostEntry = do
22  throwNoSuchThingIfNull        "getHostEntry" "unable to retrieve host entry"