X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-bsd-sockets%2Fname-service.lisp;h=8e96c7b065c0fd8b9fa95fcff8c406aed3b5a383;hb=78eea0607fb44f620a8192e173f91860d3622967;hp=bf8b17e82fb024ba4779d1e481966ee3b284229f;hpb=9f1f248d53e2a6a9af3784f49ac9f0ab6ec1a414;p=sbcl.git diff --git a/contrib/sb-bsd-sockets/name-service.lisp b/contrib/sb-bsd-sockets/name-service.lisp index bf8b17e..8e96c7b 100644 --- a/contrib/sb-bsd-sockets/name-service.lisp +++ b/contrib/sb-bsd-sockets/name-service.lisp @@ -20,7 +20,7 @@ (car (host-ent-addresses host-ent))) (defun make-host-ent (h &optional errno) - (when (sb-grovel::foreign-nullp h) + (when (sb-alien:null-alien h) (name-service-error "gethostbyname" errno)) (let* ((length (sockint::hostent-length h)) (aliases (loop for i = 0 then (1+ i) @@ -90,9 +90,9 @@ weird stuff - see gethostbyname(3) or getaddrinfo(3) for the details." #+sb-bsd-sockets-addrinfo (defun get-address-info (node) - (sb-alien:with-alien ((res (* (* sockint::addrinfo)) :local - (sb-alien:make-alien (* sockint::addrinfo)))) - (let ((err (sockint::getaddrinfo node nil nil res))) + (sb-alien:with-alien ((buf (sb-alien:array (* sockint::addrinfo) 1))) + (let* ((res (sb-alien:addr (sb-alien:deref buf 0))) + (err (sockint::getaddrinfo node nil nil res))) (if (zerop err) (let ((host-ent (make-instance 'host-ent :name node @@ -114,7 +114,7 @@ weird stuff - see gethostbyname(3) or getaddrinfo(3) for the details." 4) (host-ent-addresses host-ent) :test 'equalp))))) - (sockint::free-addrinfo (sb-alien:deref res)) + (sockint::freeaddrinfo (sb-alien:deref res)) host-ent) (addrinfo-error "getaddrinfo" err)))))