os: drop extra ifdefs for AF_INET6
Since IPv6 is now only defined if IPv6 is really supported, we don't need to ifdef on AF_INET6 anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539>
This commit is contained in:
parent
bc55a98d62
commit
f8057261fe
46
os/access.c
46
os/access.c
|
@ -455,13 +455,13 @@ DefineSelf(int fd)
|
|||
union {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in in;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct sockaddr_in6 in6;
|
||||
#endif
|
||||
} saddr;
|
||||
|
||||
struct sockaddr_in *inetaddr;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct sockaddr_in6 *inet6addr;
|
||||
#endif
|
||||
struct sockaddr_in broad_addr;
|
||||
|
@ -486,7 +486,7 @@ DefineSelf(int fd)
|
|||
memcpy(&(inetaddr->sin_addr), hp->h_addr, hp->h_length);
|
||||
len = sizeof(saddr.sa);
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case AF_INET6:
|
||||
inet6addr = (struct sockaddr_in6 *) (&(saddr.sa));
|
||||
memcpy(&(inet6addr->sin6_addr), hp->h_addr, hp->h_length);
|
||||
|
@ -530,7 +530,7 @@ DefineSelf(int fd)
|
|||
XdmcpRegisterBroadcastAddress((struct sockaddr_in *)
|
||||
&broad_addr);
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (family == FamilyInternet6 &&
|
||||
!(IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))) {
|
||||
XdmcpRegisterConnection(family, (char *) addr, len);
|
||||
|
@ -578,7 +578,7 @@ DefineSelf(int fd)
|
|||
#define ifraddr_size(a) (sizeof (a))
|
||||
#endif
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
static void
|
||||
in6_fillscopeid(struct sockaddr_in6 *sin6)
|
||||
{
|
||||
|
@ -671,7 +671,7 @@ DefineSelf(int fd)
|
|||
&len, (void **) &addr);
|
||||
if (family == -1 || family == FamilyLocal)
|
||||
continue;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (family == FamilyInternet6)
|
||||
in6_fillscopeid((struct sockaddr_in6 *) &IFR_IFR_ADDR);
|
||||
#endif
|
||||
|
@ -699,7 +699,7 @@ DefineSelf(int fd)
|
|||
* If this isn't an Internet Address, don't register it.
|
||||
*/
|
||||
if (family != FamilyInternet
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
&& family != FamilyInternet6
|
||||
#endif
|
||||
)
|
||||
|
@ -712,7 +712,7 @@ DefineSelf(int fd)
|
|||
if (family == FamilyInternet &&
|
||||
addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1)
|
||||
continue;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (family == FamilyInternet6 &&
|
||||
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
|
||||
continue;
|
||||
|
@ -729,7 +729,7 @@ DefineSelf(int fd)
|
|||
|
||||
XdmcpRegisterConnection(family, (char *) addr, len);
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
/* IPv6 doesn't support broadcasting, so we drop out here */
|
||||
if (family == FamilyInternet6)
|
||||
continue;
|
||||
|
@ -796,7 +796,7 @@ DefineSelf(int fd)
|
|||
(void **) &addr);
|
||||
if (family == -1 || family == FamilyLocal)
|
||||
continue;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (family == FamilyInternet6)
|
||||
in6_fillscopeid((struct sockaddr_in6 *) ifr->ifa_addr);
|
||||
#endif
|
||||
|
@ -820,7 +820,7 @@ DefineSelf(int fd)
|
|||
* If this isn't an Internet Address, don't register it.
|
||||
*/
|
||||
if (family != FamilyInternet
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
&& family != FamilyInternet6
|
||||
#endif
|
||||
)
|
||||
|
@ -845,13 +845,13 @@ DefineSelf(int fd)
|
|||
if (len == 4 &&
|
||||
addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0)
|
||||
continue;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (family == FamilyInternet6 &&
|
||||
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
|
||||
continue;
|
||||
#endif
|
||||
XdmcpRegisterConnection(family, (char *) addr, len);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (family == FamilyInternet6)
|
||||
/* IPv6 doesn't support broadcasting, so we drop out here */
|
||||
continue;
|
||||
|
@ -939,7 +939,7 @@ ResetHosts(const char *display)
|
|||
char *ptr;
|
||||
int i, hostlen;
|
||||
|
||||
#if defined(TCPCONN) && (!defined(IPv6) || !defined(AF_INET6))
|
||||
#if defined(TCPCONN) && (!defined(IPv6))
|
||||
union {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in in;
|
||||
|
@ -991,7 +991,7 @@ ResetHosts(const char *display)
|
|||
family = FamilyInternet;
|
||||
hostname = ohostname + 5;
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (!strncmp("inet6:", lhostname, 6)) {
|
||||
family = FamilyInternet6;
|
||||
hostname = ohostname + 6;
|
||||
|
@ -1013,7 +1013,7 @@ ResetHosts(const char *display)
|
|||
else
|
||||
#if defined(TCPCONN)
|
||||
{
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if ((family == FamilyInternet) || (family == FamilyInternet6) ||
|
||||
(family == FamilyWild)) {
|
||||
struct addrinfo *addresses;
|
||||
|
@ -1324,7 +1324,7 @@ AddHost(ClientPtr client, int family, unsigned length, /* of bytes in pAddr */
|
|||
LocalHostEnabled = TRUE;
|
||||
break;
|
||||
case FamilyInternet:
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case FamilyInternet6:
|
||||
#endif
|
||||
case FamilyDECnet:
|
||||
|
@ -1407,7 +1407,7 @@ RemoveHost(ClientPtr client, int family, unsigned length, /* of bytes in p
|
|||
LocalHostEnabled = FALSE;
|
||||
break;
|
||||
case FamilyInternet:
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case FamilyInternet6:
|
||||
#endif
|
||||
case FamilyDECnet:
|
||||
|
@ -1491,7 +1491,7 @@ CheckAddr(int family, const void *pAddr, unsigned length)
|
|||
else
|
||||
len = -1;
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case FamilyInternet6:
|
||||
if (length == sizeof(struct in6_addr))
|
||||
len = length;
|
||||
|
@ -1576,7 +1576,7 @@ ConvertAddr(register struct sockaddr *saddr, int *len, void **addr)
|
|||
*len = sizeof(struct in_addr);
|
||||
*addr = (void *) &(((struct sockaddr_in *) saddr)->sin_addr);
|
||||
return FamilyInternet;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case AF_INET6:
|
||||
{
|
||||
struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) saddr;
|
||||
|
@ -1806,7 +1806,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
|
|||
* support for other address families, such as DECnet, could be added if
|
||||
* desired.
|
||||
*/
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if ((family == FamilyInternet) || (family == FamilyInternet6)) {
|
||||
char hostname[SI_HOSTNAME_MAXLEN];
|
||||
struct addrinfo *addresses;
|
||||
|
@ -1929,7 +1929,7 @@ siHostnameCheckAddr(const char *valueString, int length, void *typePriv)
|
|||
return len;
|
||||
}
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
/***
|
||||
* "ipv6" server interpreted type
|
||||
*
|
||||
|
@ -2139,7 +2139,7 @@ static void
|
|||
siTypesInitialize(void)
|
||||
{
|
||||
siTypeAdd("hostname", siHostnameAddrMatch, siHostnameCheckAddr, NULL);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
siTypeAdd("ipv6", siIPv6AddrMatch, siIPv6CheckAddr, NULL);
|
||||
#endif
|
||||
#if !defined(NO_LOCAL_CLIENT_CRED)
|
||||
|
|
|
@ -397,7 +397,7 @@ AuthAudit(ClientPtr client, Bool letin,
|
|||
snprintf(addr, sizeof(addr), "IP %s",
|
||||
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case AF_INET6:{
|
||||
char ipaddr[INET6_ADDRSTRLEN];
|
||||
|
||||
|
|
|
@ -1075,7 +1075,7 @@ set_font_authorizations(char **authorizations, int *authlen, void *client)
|
|||
char hname[1024], *hnameptr;
|
||||
unsigned int len;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct addrinfo hints, *ai = NULL;
|
||||
#else
|
||||
struct hostent *host;
|
||||
|
@ -1086,7 +1086,7 @@ set_font_authorizations(char **authorizations, int *authlen, void *client)
|
|||
#endif
|
||||
|
||||
gethostname(hname, 1024);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_CANONNAME;
|
||||
if (getaddrinfo(hname, NULL, &hints, &ai) == 0) {
|
||||
|
@ -1116,7 +1116,7 @@ set_font_authorizations(char **authorizations, int *authlen, void *client)
|
|||
p += sizeof(AUTHORIZATION_NAME);
|
||||
memcpy(p, hnameptr, len);
|
||||
p += len;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (ai) {
|
||||
freeaddrinfo(ai);
|
||||
}
|
||||
|
|
62
os/xdmcp.c
62
os/xdmcp.c
|
@ -72,7 +72,7 @@ static const char *defaultDisplayClass = "MIT-unspecified";
|
|||
static int xdmcpSocket, sessionSocket;
|
||||
static xdmcp_states state;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
static int xdmcpSocket6;
|
||||
static struct sockaddr_storage req_sockaddr;
|
||||
#else
|
||||
|
@ -91,7 +91,7 @@ static char *xdmAuthCookie;
|
|||
|
||||
static XdmcpBuffer buffer;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
|
||||
static struct addrinfo *mgrAddr;
|
||||
static struct addrinfo *mgrAddrFirst;
|
||||
|
@ -130,7 +130,7 @@ static SOCKADDR_TYPE FromAddress;
|
|||
static SOCKLEN_TYPE ManagerAddressLen, FromAddressLen;
|
||||
#endif
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
static struct multicastinfo {
|
||||
struct multicastinfo *next;
|
||||
struct addrinfo *ai;
|
||||
|
@ -183,7 +183,7 @@ static void get_fromaddr_by_name(int argc,
|
|||
char **argv,
|
||||
int i);
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
static int get_mcast_options(int argc,
|
||||
char **argv,
|
||||
int i);
|
||||
|
@ -226,7 +226,7 @@ XdmcpUseMsg(void)
|
|||
{
|
||||
ErrorF("-query host-name contact named host for XDMCP\n");
|
||||
ErrorF("-broadcast broadcast for XDMCP\n");
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
ErrorF("-multicast [addr [hops]] IPv6 multicast for XDMCP\n");
|
||||
#endif
|
||||
ErrorF("-indirect host-name contact named host for indirect XDMCP\n");
|
||||
|
@ -265,7 +265,7 @@ XdmcpOptions(int argc, char **argv, int i)
|
|||
XdmcpDefaultListen();
|
||||
return i + 1;
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (strcmp(argv[i], "-multicast") == 0) {
|
||||
i = get_mcast_options(argc, argv, ++i);
|
||||
XDM_INIT_STATE = XDM_MULTICAST;
|
||||
|
@ -471,7 +471,7 @@ XdmcpRegisterConnection(int type, const char *address, int addrlen)
|
|||
if (SOCKADDR_FAMILY(FromAddress) == AF_INET) {
|
||||
fromAddr = &((struct sockaddr_in *) &FromAddress)->sin_addr;
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if ((SOCKADDR_FAMILY(FromAddress) == AF_INET6) &&
|
||||
IN6_IS_ADDR_V4MAPPED(&
|
||||
((struct sockaddr_in6 *)
|
||||
|
@ -482,7 +482,7 @@ XdmcpRegisterConnection(int type, const char *address, int addrlen)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (addrlen == sizeof(struct in6_addr)) {
|
||||
if (SOCKADDR_FAMILY(FromAddress) == AF_INET6) {
|
||||
fromAddr = &((struct sockaddr_in6 *) &FromAddress)->sin6_addr;
|
||||
|
@ -579,7 +579,7 @@ xdmcp_reset(void)
|
|||
timeOutRtx = 0;
|
||||
if (xdmcpSocket >= 0)
|
||||
SetNotifyFd(xdmcpSocket, XdmcpSocketNotify, X_NOTIFY_READ, NULL);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (xdmcpSocket6 >= 0)
|
||||
SetNotifyFd(xdmcpSocket6, XdmcpSocketNotify, X_NOTIFY_READ, NULL);
|
||||
#endif
|
||||
|
@ -715,7 +715,7 @@ static ARRAY8 UnwillingMessage = { (CARD8) 14, (CARD8 *) "Host unwilling" };
|
|||
static void
|
||||
receive_packet(int socketfd)
|
||||
{
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct sockaddr_storage from;
|
||||
#else
|
||||
struct sockaddr_in from;
|
||||
|
@ -774,7 +774,7 @@ send_packet(void)
|
|||
case XDM_QUERY:
|
||||
case XDM_BROADCAST:
|
||||
case XDM_INDIRECT:
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case XDM_MULTICAST:
|
||||
#endif
|
||||
send_query_msg();
|
||||
|
@ -838,7 +838,7 @@ timeout(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (state == XDM_COLLECT_QUERY || state == XDM_COLLECT_INDIRECT_QUERY) {
|
||||
/* Try next address */
|
||||
for (mgrAddr = mgrAddr->ai_next;; mgrAddr = mgrAddr->ai_next) {
|
||||
|
@ -862,7 +862,7 @@ timeout(void)
|
|||
case XDM_COLLECT_BROADCAST_QUERY:
|
||||
state = XDM_BROADCAST;
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case XDM_COLLECT_MULTICAST_QUERY:
|
||||
state = XDM_MULTICAST;
|
||||
break;
|
||||
|
@ -919,7 +919,7 @@ get_xdmcp_sock(void)
|
|||
int soopts = 1;
|
||||
int socketfd = -1;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if ((xdmcpSocket6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
|
||||
XdmcpWarning("INET6 UDP socket creation failed");
|
||||
#endif
|
||||
|
@ -936,7 +936,7 @@ get_xdmcp_sock(void)
|
|||
|
||||
if (SOCKADDR_FAMILY(FromAddress) == AF_INET)
|
||||
socketfd = xdmcpSocket;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (SOCKADDR_FAMILY(FromAddress) == AF_INET6)
|
||||
socketfd = xdmcpSocket6;
|
||||
#endif
|
||||
|
@ -955,7 +955,7 @@ send_query_msg(void)
|
|||
XdmcpHeader header;
|
||||
Bool broadcast = FALSE;
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
Bool multicast = FALSE;
|
||||
#endif
|
||||
int i;
|
||||
|
@ -972,7 +972,7 @@ send_query_msg(void)
|
|||
state = XDM_COLLECT_BROADCAST_QUERY;
|
||||
broadcast = TRUE;
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case XDM_MULTICAST:
|
||||
header.opcode = (CARD16) BROADCAST_QUERY;
|
||||
state = XDM_COLLECT_MULTICAST_QUERY;
|
||||
|
@ -998,7 +998,7 @@ send_query_msg(void)
|
|||
(XdmcpNetaddr) &BroadcastAddresses[i],
|
||||
sizeof(struct sockaddr_in));
|
||||
}
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
else if (multicast) {
|
||||
struct multicastinfo *mcl;
|
||||
struct addrinfo *ai;
|
||||
|
@ -1030,7 +1030,7 @@ send_query_msg(void)
|
|||
}
|
||||
#endif
|
||||
else {
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (SOCKADDR_FAMILY(ManagerAddress) == AF_INET6)
|
||||
socketfd = xdmcpSocket6;
|
||||
#endif
|
||||
|
@ -1059,7 +1059,7 @@ recv_willing_msg(struct sockaddr *from, int fromlen, unsigned length)
|
|||
XdmcpSelectHost(from, fromlen, &authenticationName);
|
||||
break;
|
||||
case XDM_COLLECT_BROADCAST_QUERY:
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case XDM_COLLECT_MULTICAST_QUERY:
|
||||
#endif
|
||||
case XDM_COLLECT_INDIRECT_QUERY:
|
||||
|
@ -1090,7 +1090,7 @@ send_request_msg(void)
|
|||
case AF_INET:
|
||||
XdmcpConnectionType = FamilyInternet;
|
||||
break;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
case AF_INET6:
|
||||
XdmcpConnectionType = FamilyInternet6;
|
||||
break;
|
||||
|
@ -1154,7 +1154,7 @@ send_request_msg(void)
|
|||
XdmcpDisposeARRAY8(&authenticationData);
|
||||
XdmcpWriteARRAYofARRAY8(&buffer, &AuthorizationNames);
|
||||
XdmcpWriteARRAY8(&buffer, &ManufacturerDisplayID);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
|
||||
socketfd = xdmcpSocket6;
|
||||
#endif
|
||||
|
@ -1248,7 +1248,7 @@ send_manage_msg(void)
|
|||
XdmcpWriteCARD16(&buffer, DisplayNumber);
|
||||
XdmcpWriteARRAY8(&buffer, &DisplayClass);
|
||||
state = XDM_AWAIT_MANAGE_RESPONSE;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
|
||||
socketfd = xdmcpSocket6;
|
||||
#endif
|
||||
|
@ -1305,7 +1305,7 @@ send_keepalive_msg(void)
|
|||
XdmcpWriteCARD32(&buffer, SessionID);
|
||||
|
||||
state = XDM_AWAIT_ALIVE_RESPONSE;
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6)
|
||||
socketfd = xdmcpSocket6;
|
||||
#endif
|
||||
|
@ -1353,12 +1353,12 @@ get_addr_by_name(const char *argtype,
|
|||
const char *namestr,
|
||||
int port,
|
||||
int socktype, SOCKADDR_TYPE * addr, SOCKLEN_TYPE * addrlen
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
, struct addrinfo **aip, struct addrinfo **aifirstp
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct addrinfo *ai;
|
||||
struct addrinfo hints;
|
||||
char portstr[6];
|
||||
|
@ -1437,7 +1437,7 @@ get_manager_by_name(int argc, char **argv, int i)
|
|||
|
||||
get_addr_by_name(argv[i], argv[i + 1], xdm_udp_port, SOCK_DGRAM,
|
||||
&ManagerAddress, &ManagerAddressLen
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
, &mgrAddr, &mgrAddrFirst
|
||||
#endif
|
||||
);
|
||||
|
@ -1446,7 +1446,7 @@ get_manager_by_name(int argc, char **argv, int i)
|
|||
static void
|
||||
get_fromaddr_by_name(int argc, char **argv, int i)
|
||||
{
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
struct addrinfo *ai = NULL;
|
||||
struct addrinfo *aifirst = NULL;
|
||||
#endif
|
||||
|
@ -1454,18 +1454,18 @@ get_fromaddr_by_name(int argc, char **argv, int i)
|
|||
FatalError("Xserver: missing -from host name in command line\n");
|
||||
}
|
||||
get_addr_by_name("-from", argv[i], 0, 0, &FromAddress, &FromAddressLen
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
, &ai, &aifirst
|
||||
#endif
|
||||
);
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
if (aifirst != NULL)
|
||||
freeaddrinfo(aifirst);
|
||||
#endif
|
||||
xdm_from = argv[i];
|
||||
}
|
||||
|
||||
#if defined(IPv6) && defined(AF_INET6)
|
||||
#if defined(IPv6)
|
||||
static int
|
||||
get_mcast_options(int argc, char **argv, int i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue