mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
Merge branch 'getaddrinfo-fixes' into 'develop'
Minor fixes for get-host-by-name from sockets See merge request embeddable-common-lisp/ecl!199
This commit is contained in:
commit
34cd3dc221
1 changed files with 5 additions and 5 deletions
|
|
@ -222,10 +222,10 @@ other weird stuff - see getaddrinfo(3) for details."
|
|||
int err;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_INET; /* IPv4 */
|
||||
hints.ai_socktype = 0; /* Any type */
|
||||
hints.ai_protocol = 0; /* Any protocol */
|
||||
hints.ai_flags = (AI_ADDRCONFIG | AI_CANONNAME); /* Get cannonname */
|
||||
hints.ai_family = AF_INET; /* IPv4 */
|
||||
hints.ai_socktype = 0; /* Any type */
|
||||
hints.ai_protocol = 0; /* Any protocol */
|
||||
hints.ai_flags = (AI_CANONNAME); /* Get cannonname */
|
||||
hints.ai_addr = NULL;
|
||||
hints.ai_next = NULL;
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ other weird stuff - see getaddrinfo(3) for details."
|
|||
ecl_aset(vector,1, ecl_make_fixnum( (ip>>16) & 0xFF));
|
||||
ecl_aset(vector,2, ecl_make_fixnum( (ip>>8) & 0xFF));
|
||||
ecl_aset(vector,3, ecl_make_fixnum( ip & 0xFF ));
|
||||
addresses = CONS(vector, addresses);
|
||||
addresses = cl_adjoin(4, vector, addresses, @':test, @'equalp);
|
||||
if ( rp->ai_canonname != 0 ) {
|
||||
cl_object alias = ecl_make_simple_base_string( rp->ai_canonname, -1 );
|
||||
aliases = CONS(alias, aliases);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue