#2103: Some functions do not work on NetBSD
----------------------------------+-----------------------------------------
    Reporter:  iquiw              |        Owner:        
        Type:  bug                |       Status:  new   
    Priority:  normal             |    Milestone:        
   Component:  libraries/network  |      Version:  6.8.2 
    Severity:  normal             |   Resolution:        
    Keywords:  network            |     Testcase:        
Architecture:  Unknown            |           Os:  NetBSD
----------------------------------+-----------------------------------------
Changes (by iquiw):

  * keywords:  => network

Comment:

 Sample programs to causes the problems.

 (1) sample1.hs
 {{{
 import Network

 main = listenOn (PortNumber 8000)
 }}}
 Before the attached patch is applied,
 {{{
 $ runghc sample1.hs
 sample1.hs: getAddrInfo: does not exist (servname not supported for
 ai_socktype)
 }}}
 After, no error.

 (2) sample2.hs
 {{{
 import Network

 main = print =<< getAddrInfo Nothing Nothing (Just "http")
 }}}
 Before the patch,
 {{{
 $ runghc sample2.hs
 [AddrInfo {addrFlags = [], addrFamily = AF_INET6, addrSocketType =
 Datagram, addrProtocol = 17, addrAddress = [b.hs: getNameInfo: does not
 exist (Non-recoverable failure in name resolution)
 }}}
 After,
 {{{
 $ runghc sample2.hs
 [AddrInfo {addrFlags = [], addrFamily = AF_INET6, addrSocketType =
 Datagram, addrProtocol = 17, addrAddress = [::1]:80, addrCanonName =
 Nothing},AddrInfo {addrFlags = [], addrFamily = AF_INET6, addrSocketType =
 Stream, addrProtocol = 6, addrAddress = [::1]:80, addrCanonName =
 Nothing},AddrInfo {addrFlags = [], addrFamily = AF_INET, addrSocketType =
 Datagram, addrProtocol = 17, addrAddress = 127.0.0.1:80, addrCanonName =
 Nothing},AddrInfo {addrFlags = [], addrFamily = AF_INET, addrSocketType =
 Stream, addrProtocol = 6, addrAddress = 127.0.0.1:80, addrCanonName =
 Nothing}]
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2103#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to