Page MenuHomeFreeBSD

ping: allow building without INET support
ClosedPublic

Authored by asomers on Nov 27 2020, 3:31 PM.

Details

Summary

ping: allow building without INET support

Building without INET6 support was already possible. Now it's possible to
build ping with only INET6, or even with neither INET nor INET6.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sbin/ping/main.c
107 ↗(On Diff #80059)

some places are INET6 and INET others are INET and INET6. Please consider ordering consistently (I'd recommend INET and INET6) . It's only in 3 places, so having a define for both likely isn't helpful...

THANK YOU SO MUCH FOR THIS! YOU ROCK!

Minor style things. Apart from that it looks great from reading through :-)))))))

sbin/ping/main.c
112 ↗(On Diff #80070)

Two consecutive INET && INET6 blocks, though I admit logically the split makes sense.

149 ↗(On Diff #80070)

C++ style comment

153 ↗(On Diff #80070)

C++ style comment

155 ↗(On Diff #80070)

Just FYI: alternatively I do use a switch call in these cases but in this case with the final returns it seems to work with two independent if() just fine.

183 ↗(On Diff #80070)

C++ style comment

This revision is now accepted and ready to land.Nov 28 2020, 1:12 PM
This revision was automatically updated to reflect the committed changes.