forked from Lainports/freebsd-ports
If one builds and uses net/fping version 4.2 with option IPV6 disabled, the command fping -4 always fails with wrong error message: fping: can't specify both -4 and -6 This makes it impossible using fping probes with SmokePing as it runs fping with -4 option. This change fixes this. Also, do not install symlinks for fping6 and manual in this case. PORTREVISION not bumped as default build is not affected. PR: 238327 Approved by: jharris@widomaker.com (maintainter timeout, 2 weeks)
11 lines
445 B
C
11 lines
445 B
C
--- src/fping.c.orig 2019-02-19 20:54:45 UTC
|
|
+++ src/fping.c
|
|
@@ -427,7 +427,7 @@ int main(int argc, char** argv)
|
|
while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
|
|
switch (c) {
|
|
case '4':
|
|
- if (hints_ai_family != AF_UNSPEC) {
|
|
+ if (hints_ai_family == AF_INET6) {
|
|
fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
|
|
exit(1);
|
|
}
|