forked from Lainports/freebsd-ports
net/fping: fix WITHOUT_IPV6 mode
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)
This commit is contained in:
parent
a63952412f
commit
a3ab4375e3
3 changed files with 16 additions and 4 deletions
|
|
@ -24,10 +24,11 @@ CONFIGURE_ARGS= --bindir="${PREFIX}/sbin" \
|
|||
--enable-ipv4
|
||||
INSTALL_TARGET= install-strip
|
||||
|
||||
OPTIONS_DEFINE=IPV6
|
||||
OPTIONS_DEFINE= IPV6
|
||||
OPTIONS_SUB= yes
|
||||
IPV6_CONFIGURE_OFF=--disable-ipv6
|
||||
|
||||
post-install:
|
||||
post-install-IPV6-on:
|
||||
${RLN} ${STAGEDIR}${PREFIX}/sbin/fping ${STAGEDIR}${PREFIX}/sbin/fping6
|
||||
${RLN} ${STAGEDIR}${PREFIX}/man/man8/fping.8 ${STAGEDIR}${PREFIX}/man/man8/fping6.8
|
||||
|
||||
|
|
|
|||
11
net/fping/files/patch-src_fping.c
Normal file
11
net/fping/files/patch-src_fping.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- 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);
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@mode 4555
|
||||
sbin/fping
|
||||
sbin/fping6
|
||||
%%IPV6%%sbin/fping6
|
||||
@mode
|
||||
man/man8/fping.8.gz
|
||||
man/man8/fping6.8.gz
|
||||
%%IPV6%%man/man8/fping6.8.gz
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue