[openssh-commits] [openssh] 01/02: conditionalise match localnetwork on ifaddrs.h

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jul 18 15:42:06 AEST 2023


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit ff047504fa6e008c4092f8929881816b8993bea0
Author: Damien Miller <djm at mindrot.org>
Date:   Tue Jul 18 15:30:45 2023 +1000

    conditionalise match localnetwork on ifaddrs.h
    
    Fixes build breakage on platforms that lack getifaddrs()
---
 readconf.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/readconf.c b/readconf.c
index fe61616e..0d50e89b 100644
--- a/readconf.c
+++ b/readconf.c
@@ -588,6 +588,7 @@ execute_in_shell(const char *cmd)
 static int
 check_match_ifaddrs(const char *addrlist)
 {
+#ifdef HAVE_IFADDRS_H
 	struct ifaddrs *ifa, *ifaddrs = NULL;
 	int r, found = 0;
 	char addr[NI_MAXHOST];
@@ -635,6 +636,10 @@ check_match_ifaddrs(const char *addrlist)
 	}
 	freeifaddrs(ifaddrs);
 	return found;
+#else /* HAVE_IFADDRS_H */
+	error("match localnetwork: not supported on this platform");
+	return 0;
+#endif /* HAVE_IFADDRS_H */
 }
 
 /*

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list