aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-02-12 20:36:20 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-02-12 20:36:20 +0000
commit8ca99aecf749dd088310f81f3c5364a462f1e332 (patch)
tree90f35b5ffeaa779dc12bfb262fc1d27a81db87bf /sys
parent8170a7d43835047f9c1548a081eea45116473995 (diff)
downloadsrc-8ca99aecf749dd088310f81f3c5364a462f1e332.tar.gz
src-8ca99aecf749dd088310f81f3c5364a462f1e332.zip
Fix various NOINET* builds broken by 145bf6c0af48.
Reported by: mjg, bdragon
Diffstat (limited to 'sys')
-rw-r--r--sys/net/rtsock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index f67252f9fd5f..f8e741d87a10 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -587,16 +587,20 @@ fill_blackholeinfo(struct rt_addrinfo *info, union sockaddr_union *saun)
bzero(saun, sizeof(union sockaddr_union));
switch (saf) {
+#ifdef INET
case AF_INET:
saun->sin.sin_family = AF_INET;
saun->sin.sin_len = sizeof(struct sockaddr_in);
saun->sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
break;
+#endif
+#ifdef INET6
case AF_INET6:
saun->sin6.sin6_family = AF_INET6;
saun->sin6.sin6_len = sizeof(struct sockaddr_in6);
saun->sin6.sin6_addr = in6addr_loopback;
break;
+#endif
default:
return (ENOTSUP);
}