7 struct hostent
*gethostbyaddr(const void *a
, socklen_t l
, int af
)
9 static struct hostent
*h
;
15 h
= malloc(size
+=size
+1);
17 h_errno
= NO_RECOVERY
;
20 err
= gethostbyaddr_r(a
, l
, af
, h
,
21 (void *)(h
+1), size
-sizeof *h
, &res
, &h_errno
);
22 } while (err
== ERANGE
);