sbin: build ping if at least one of INET & INET6 is enabled
It does not build (and serves no purpose) if neither is true (i.e., building WITHOUT_INET and WITHOUT_INET6). Also add an explicit error in ping to make this case clear. PR: 260082 Sponsored by: The FreeBSD Foundation (cherry picked from commita4ef9e58bc
) OptionalObsoleteFiles: remove ping with INET & INET6 disabled Reported by: kevans Fixes:a4ef9e58bc
("sbin: build ping if at least one of...") Sponsored by: The FreeBSD Foundation (cherry picked from commit0179739a00
)
This commit is contained in:
parent
c775b6ebab
commit
0f0d52fd6a
@ -53,7 +53,6 @@ SUBDIR=adjkerntz \
|
||||
nfsiod \
|
||||
nos-tun \
|
||||
pfilctl \
|
||||
ping \
|
||||
rcorder \
|
||||
reboot \
|
||||
recoverdisk \
|
||||
@ -69,6 +68,10 @@ SUBDIR=adjkerntz \
|
||||
tunefs \
|
||||
umount
|
||||
|
||||
.if ${MK_INET} != "no" || ${MK_INET6} != "no"
|
||||
SUBDIR+= ping
|
||||
.endif
|
||||
|
||||
SUBDIR.${MK_CCD}+= ccdconfig
|
||||
SUBDIR.${MK_CXX}+= devd
|
||||
SUBDIR.${MK_HAST}+= hastctl
|
||||
|
@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$");
|
||||
#define OPTSTR PING4OPTS
|
||||
#elif defined(INET6)
|
||||
#define OPTSTR PING6OPTS
|
||||
#else
|
||||
#error At least one of INET and INET6 is required
|
||||
#endif
|
||||
|
||||
int
|
||||
|
@ -2571,6 +2571,11 @@ OLD_DIRS+=usr/share/i18n/csmapper/KS
|
||||
OLD_DIRS+=usr/share/i18n/csmapper/GB
|
||||
.endif
|
||||
|
||||
.if ${MK_INET} == no && ${MK_INET6} == no
|
||||
OLD_FILES+=sbin/ping
|
||||
OLD_FILES+=usr/share/man/man8/ping.8.gz
|
||||
.endif
|
||||
|
||||
.if ${MK_INET6} == no
|
||||
OLD_FILES+=sbin/ping6
|
||||
OLD_FILES+=sbin/rtsol
|
||||
|
Loading…
Reference in New Issue
Block a user