From 3a4989a503ea1d4034fd4d41ef4159a5b52e80a5 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 15 Feb 2012 19:41:45 +0000
Subject: [PATCH] Blindly attempt to fix OpenBSD build by assuming that
 AI_ADDRCONFIG is not defined on that platform.

---
 src/syncterm/conn.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/syncterm/conn.c b/src/syncterm/conn.c
index a0b2ea87ac..042e2cc450 100644
--- a/src/syncterm/conn.c
+++ b/src/syncterm/conn.c
@@ -418,7 +418,10 @@ int conn_socket_connect(struct bbslist *bbs)
 	hints.ai_flags=PF_UNSPEC;
 	hints.ai_socktype=SOCK_STREAM;
 	hints.ai_protocol=IPPROTO_TCP;
-	hints.ai_flags=AI_ADDRCONFIG|AI_NUMERICSERV;
+	hints.ai_flags=AI_NUMERICSERV;
+#ifdef AI_ADDRCONFIG
+	hints.ai_flags|=AI_ADDRCONFIG;
+#endif
 	sprintf(portnum, "%hu", bbs->port);
 	if(getaddrinfo(bbs->addr, portnum, &hints, &res)!=0) {
 		failcode=FAILURE_RESOLVE;
-- 
GitLab