Allow the -4 option even in an IPv4-only configuration

Allow the -4 option even if IPv6 isn't compiled in.
This commit is contained in:
H. Peter Anvin 2008-07-23 14:36:18 -04:00
parent 4bdac0b536
commit c3a5c712e2
4 changed files with 8 additions and 7 deletions

View file

@ -221,10 +221,10 @@ int main(int argc, char *argv[])
if (argv[arg][0] == '-') {
for (optx = &argv[arg][1]; *optx; optx++) {
switch (*optx) {
#ifdef HAVE_IPV6
case '4':
ai_fam = AF_INET;
break;
#ifdef HAVE_IPV6
case '6':
ai_fam = AF_INET6;
break;

View file

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\"----------------------------------------------------------------------- */
.TH TFTP 1 "12 December 2006" "tftp-hpa @@VERSION@@" "User's Manual"
.TH TFTP 1 "23 July 2008" "tftp-hpa @@VERSION@@" "User's Manual"
.SH NAME
.B tftp
\- IPv4 Trivial File Transfer Protocol client
@ -56,9 +56,10 @@ command below.)
.SH OPTIONS
.TP
.B \-4
Connect with IPv4 only, if IPv6 support was compiled in.
Connect with IPv4 only, even if IPv6 support was compiled in.
.TP
.B \-6
Connect with IPv6 only, if compiled in.
.TP
\fB\-c\fP \fIcommand\fP
Execute \fIcommand\fP as if it had been entered on the tftp prompt.