same fix as android for windows getAddrInfo not working

This commit is contained in:
Joey Hess 2013-12-05 23:03:54 -04:00
parent a5c83e5679
commit ffd3e70046

View file

@ -93,11 +93,11 @@ webAppSettings = defaultSettings
-}
getSocket :: Maybe HostName -> IO Socket
getSocket h = do
#ifdef __ANDROID__
#if defined(__ANDROID__) || defined (mingw32_HOST_OS)
-- getAddrInfo currently segfaults on Android.
-- The HostName is ignored by this code.
when (isJust h) $
error "getSocket with HostName not supported on Android"
error "getSocket with HostName not supported on this OS"
addr <- inet_addr "127.0.0.1"
sock <- socket AF_INET Stream defaultProtocol
preparesocket sock