same fix as android for windows getAddrInfo not working
This commit is contained in:
parent
a5c83e5679
commit
ffd3e70046
1 changed files with 2 additions and 2 deletions
|
@ -93,11 +93,11 @@ webAppSettings = defaultSettings
|
||||||
-}
|
-}
|
||||||
getSocket :: Maybe HostName -> IO Socket
|
getSocket :: Maybe HostName -> IO Socket
|
||||||
getSocket h = do
|
getSocket h = do
|
||||||
#ifdef __ANDROID__
|
#if defined(__ANDROID__) || defined (mingw32_HOST_OS)
|
||||||
-- getAddrInfo currently segfaults on Android.
|
-- getAddrInfo currently segfaults on Android.
|
||||||
-- The HostName is ignored by this code.
|
-- The HostName is ignored by this code.
|
||||||
when (isJust h) $
|
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"
|
addr <- inet_addr "127.0.0.1"
|
||||||
sock <- socket AF_INET Stream defaultProtocol
|
sock <- socket AF_INET Stream defaultProtocol
|
||||||
preparesocket sock
|
preparesocket sock
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue