Skip to content

Commit

Permalink
[project @ 2003-03-05 09:52:23 by simonmar]
Browse files Browse the repository at this point in the history
Make this compile
  • Loading branch information
simonmar committed Mar 5, 2003
1 parent 3f3114b commit 7b08679
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Network/BSD.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ getProtocolNumber proto = do
#if !defined(cygwin32_TARGET_OS) && !defined(mingw32_TARGET_OS) && !defined(_WIN32)
getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
getProtocolEntry = do
throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
$ (trySysCall.c_getprotoent) Nothing
>>= peek
ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
$ trySysCall c_getprotoent
peek ent

foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)

Expand Down Expand Up @@ -350,9 +350,9 @@ hostAddress (HostEntry nm _ _ ls) =
getHostByName :: HostName -> IO HostEntry
getHostByName name = do
withCString name $ \ name_cstr -> do
throwNoSuchThingIfNull "getHostByName" "no such host entry"
$ trySysCall $ c_gethostbyname name_cstr Nothing
>>= peek
ent <- throwNoSuchThingIfNull "getHostByName" "no such host entry"
$ trySysCall $ c_gethostbyname name_cstr
peek ent

foreign import ccall unsafe "gethostbyname"
c_gethostbyname :: CString -> IO (Ptr HostEntry)
Expand Down

0 comments on commit 7b08679

Please sign in to comment.