sync with OpenBSD -current
This commit is contained in:
parent
5d45cd7ee8
commit
155eb8555e
5506 changed files with 1786257 additions and 1416034 deletions
|
@ -42,11 +42,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#define __TYPES__
|
||||
#endif
|
||||
#ifndef WIN32
|
||||
#ifndef Lynx
|
||||
#include <sys/socket.h>
|
||||
#else
|
||||
#include <socket.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -67,13 +63,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
const char *
|
||||
get_hostname (Xauth *auth)
|
||||
{
|
||||
#ifdef TCPCONN
|
||||
static struct hostent *hp;
|
||||
int af;
|
||||
|
||||
hp = NULL;
|
||||
#endif
|
||||
|
||||
if (auth->address_length == 0)
|
||||
return "Illegal Address";
|
||||
#ifdef TCPCONN
|
||||
|
@ -83,6 +72,9 @@ get_hostname (Xauth *auth)
|
|||
#endif
|
||||
)
|
||||
{
|
||||
static struct hostent *hp = NULL;
|
||||
int af;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
if (auth->family == FamilyInternet6)
|
||||
af = AF_INET6;
|
||||
|
@ -167,7 +159,6 @@ struct addrlist *get_address_info (
|
|||
#if defined(IPv6) && defined(AF_INET6)
|
||||
struct addrlist *lastrv = NULL;
|
||||
struct addrinfo *firstai = NULL;
|
||||
struct addrinfo *ai = NULL;
|
||||
struct addrinfo hints;
|
||||
#else
|
||||
unsigned int hostinetaddr;
|
||||
|
@ -252,7 +243,7 @@ struct addrlist *get_address_info (
|
|||
hints.ai_socktype = SOCK_STREAM; /* only interested in TCP */
|
||||
hints.ai_protocol = 0;
|
||||
if (getaddrinfo(host,NULL,&hints,&firstai) !=0) return NULL;
|
||||
for (ai = firstai; ai != NULL; ai = ai->ai_next) {
|
||||
for (struct addrinfo *ai = firstai; ai != NULL; ai = ai->ai_next) {
|
||||
struct addrlist *duplicate;
|
||||
|
||||
len = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue