Author: hrs Date: Thu Jan 5 03:25:16 2017 New Revision: 311354 URL: https://svnweb.freebsd.org/changeset/base/311354
Log: Fix build when WITHOUT_INET6 is defined. Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c ============================================================================== --- head/usr.sbin/inetd/inetd.c Thu Jan 5 03:20:00 2017 (r311353) +++ head/usr.sbin/inetd/inetd.c Thu Jan 5 03:25:16 2017 (r311354) @@ -315,9 +315,11 @@ whichaf(struct request_info *req) sa = (struct sockaddr *)req->client->sin; if (sa == NULL) return AF_UNSPEC; +#ifdef INET6 if (sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr)) return AF_INET; +#endif return sa->sa_family; } @@ -1283,6 +1285,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) syslog(LOG_ERR, "setsockopt (SO_PRIVSTATE): %m"); #endif /* tftpd opens a new connection then needs more infos */ +#ifdef INET6 if ((sep->se_family == AF_INET6) && (strcmp(sep->se_proto, "udp") == 0) && (sep->se_accept == 0) && @@ -1295,6 +1298,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) (char *)&flag, sizeof (flag)) < 0) syslog(LOG_ERR, "setsockopt (IPV6_V6ONLY): %m"); } +#endif #undef turnon #ifdef IPSEC ipsecsetup(sep); @@ -1332,7 +1336,9 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) u_int i; socklen_t len = sep->se_ctrladdr_size; struct netconfig *netid, *netid2 = NULL; +#ifdef INET6 struct sockaddr_in sock; +#endif struct netbuf nbuf, nbuf2; if (getsockname(sep->se_fd, @@ -1347,6 +1353,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) nbuf.len = sep->se_ctrladdr.sa_len; if (sep->se_family == AF_INET) netid = sep->se_socktype==SOCK_DGRAM? udpconf:tcpconf; +#ifdef INET6 else { netid = sep->se_socktype==SOCK_DGRAM? udp6conf:tcp6conf; if (!sep->se_nomapped) { /* INET and INET6 */ @@ -1358,6 +1365,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) sock.sin_port = sep->se_ctrladdr6.sin6_port; } } +#endif if (debug) print_service("REG ", sep); for (i = sep->se_rpc_lowvers; i <= sep->se_rpc_highvers; i++) { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"