]> git.gsnw.org Git - fping.git/commitdiff
fix build without IPv6 support
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sun, 11 May 2025 17:11:14 +0000 (19:11 +0200)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sat, 24 May 2025 12:46:52 +0000 (14:46 +0200)
In commit 57d91b13f20529a23df8c29eaf612d8483e318d8, I missed
one set of "#ifdev IPV6 ... #endif" guards for a piece of code
only relevant for IPv6 support in the generator.  This broke
the build with --disable-ipv6, or without IPv6 support on the
build system.

src/fping.c

index 9aa527a78b569bb40ece6b498a504319bd631771..8433d08927797a4abe4b1fc71fdc0a7ce2a8962e 100644 (file)
@@ -1526,6 +1526,7 @@ void add_range(char *start, char *end)
         exit(1);
     }
 
+#ifdef IPV6
     /* IPv6 addresses can have a scope */
     if (hints_ai_family == AF_INET6) {
         start_scope_str = strchr(start, '%');
@@ -1537,6 +1538,7 @@ void add_range(char *start, char *end)
                 exit(1);
         }
     }
+#endif
 
     /* parse end address */
     memset(&addr_hints, 0, sizeof(struct addrinfo));