| @@ -653,26 +653,28 @@ int BIO_get_accept_socket(char *host, in | | | @@ -653,26 +653,28 @@ int BIO_get_accept_socket(char *host, in |
653 | { | | 653 | { |
654 | if (strchr(h,':')) | | 654 | if (strchr(h,':')) |
655 | { | | 655 | { |
656 | if (h[1]=='\0') h=NULL; | | 656 | if (h[1]=='\0') h=NULL; |
657 | #ifdef AF_INET6 | | 657 | #ifdef AF_INET6 |
658 | hint.ai_family = AF_INET6; | | 658 | hint.ai_family = AF_INET6; |
659 | #else | | 659 | #else |
660 | h=NULL; | | 660 | h=NULL; |
661 | #endif | | 661 | #endif |
662 | } | | 662 | } |
663 | else if (h[0]=='*' && h[1]=='\0') | | 663 | else if (h[0]=='*' && h[1]=='\0') |
664 | h=NULL; | | 664 | h=NULL; |
665 | } | | 665 | } |
| | | 666 | /* XXX: below we cast to sockaddr_in! */ |
| | | 667 | hint.ai_family = AF_INET; |
666 | | | 668 | |
667 | if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; | | 669 | if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break; |
668 | server = *res->ai_addr; | | 670 | server = *res->ai_addr; |
669 | (*p_freeaddrinfo.f)(res); | | 671 | (*p_freeaddrinfo.f)(res); |
670 | goto again; | | 672 | goto again; |
671 | } while (0); | | 673 | } while (0); |
672 | #endif | | 674 | #endif |
673 | | | 675 | |
674 | if (!BIO_get_port(p,&port)) goto err; | | 676 | if (!BIO_get_port(p,&port)) goto err; |
675 | | | 677 | |
676 | memset((char *)&server,0,sizeof(server)); | | 678 | memset((char *)&server,0,sizeof(server)); |
677 | sa_in = (struct sockaddr_in *)&server; | | 679 | sa_in = (struct sockaddr_in *)&server; |
678 | sa_in->sin_family=AF_INET; | | 680 | sa_in->sin_family=AF_INET; |