summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 9ee16c99..a4fa0ded 100644
--- a/parse.c
+++ b/parse.c
@@ -414,7 +414,11 @@ rsRetVal parsAddrWithBits(rsParsObj *pThis, struct NetAddr **pIP, int *pBits)
memset (&hints, 0, sizeof (struct addrinfo));
hints.ai_family = AF_INET6;
- hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST;
+# ifdef AI_ADDRCONFIG
+ hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST;
+# else
+ hints.ai_flags = AI_NUMERICHOST;
+# endif
switch(getaddrinfo ((char*)pszIP+1, NULL, &hints, &res)) {
case 0:
@@ -449,7 +453,11 @@ rsRetVal parsAddrWithBits(rsParsObj *pThis, struct NetAddr **pIP, int *pBits)
} else { /* now parse IPv4 */
memset (&hints, 0, sizeof (struct addrinfo));
hints.ai_family = AF_INET;
- hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST;
+# ifdef AI_ADDRCONFIG
+ hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST;
+# else
+ hints.ai_flags = AI_NUMERICHOST;
+# endif
switch(getaddrinfo ((char*)pszIP, NULL, &hints, &res)) {
case 0: