io: fix hostname lookup for tcp-listen

Need to lookup with "passive" flag. Some platforms/configurations
apparently don't care, but some do.
This commit is contained in:
Matthew Flatt 2019-05-11 18:48:44 -06:00
parent 528da9e815
commit ff95f1860a
2 changed files with 8 additions and 1 deletions

View File

@ -1703,7 +1703,12 @@
(cpointer->name proc-p))))]
[else
(lambda (to-wrap)
(let* ([proc-p (unwrap-cpointer 'ffi-call to-wrap)])
(let* ([proc-p (unwrap-cpointer 'ffi-call to-wrap)]
#;
[name (and (ffi-obj? proc-p) (let ([n (cpointer/ffi-obj-name proc-p)])
(if (bytes? n)
(utf8->string n)
n)))])
(do-procedure-reduce-arity-mask
(lambda orig-args
(let* ([args (map (lambda (orig-arg in-type)

View File

@ -41,6 +41,8 @@
;; or might return a listener
(call-with-resolved-address
hostname port-no
#:family family
#:passive? #t
;; in atomic mode
(lambda (addr)
(cond