diff --git a/src/xpdev/multisock.c b/src/xpdev/multisock.c
index 68a0d26e4186b84f811f9272ad03de0efee417d1..fb261a62653e34063da8cb6359f9c7eb2db6f0f1 100644
--- a/src/xpdev/multisock.c
+++ b/src/xpdev/multisock.c
@@ -86,7 +86,9 @@ BOOL xpms_add(struct xpms_set *xpms_set, int domain, int type,
 		hints.ai_socktype=type;
 		hints.ai_protocol=protocol;
 		hints.ai_flags|=AI_NUMERICSERV;
+#ifdef AI_ADDRCONFIG
 		hints.ai_flags|=AI_ADDRCONFIG;
+#endif
 		sprintf(port_str, "%hu", port);
 		if((ret=getaddrinfo(addr, port_str, &hints, &res))!=0) {
 			if(xpms_set->lprintf)