- (aliases (loop for i = 0 then (1+ i)
- for al = (sb-alien:deref (sockint::hostent-aliases h) i)
- while al
- collect al))
- (addresses
- (loop for i = 0 then (1+ i)
- for ad = (sb-alien:deref (sockint::hostent-addresses h) i)
- until (sb-alien:null-alien ad)
- collect (ecase (sockint::hostent-type h)
- (#.sockint::af-inet
- (loop for i from 0 below length
- collect (sb-alien:deref ad i)))
- (#.sockint::af-local
- (sb-alien:cast ad sb-alien:c-string))))))
+ (aliases (loop for i = 0 then (1+ i)
+ for al = (sb-alien:deref (sockint::hostent-aliases h) i)
+ while al
+ collect al))
+ (addresses
+ (loop for i = 0 then (1+ i)
+ for ad = (sb-alien:deref (sockint::hostent-addresses h) i)
+ until (sb-alien:null-alien ad)
+ collect (ecase (sockint::hostent-type h)
+ (#.sockint::af-inet
+ (assert (= length 4))
+ (let ((addr (make-array 4 :element-type '(unsigned-byte 8))))
+ (loop for i from 0 below length
+ do (setf (elt addr i) (sb-alien:deref ad i)))
+ addr))
+ (#.sockint::af-local
+ (sb-alien:cast ad sb-alien:c-string))))))