Module Name:    src
Committed By:   tron
Date:           Sun Dec 13 14:06:13 UTC 2015

Modified Files:
        src/usr.bin/ftp: fetch.c ftp.c

Log Message:
(Hopefully) fix build without IPv6 support


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/usr.bin/ftp/fetch.c
cvs rdiff -u -r1.165 -r1.166 src/usr.bin/ftp/ftp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.208 src/usr.bin/ftp/fetch.c:1.209
--- src/usr.bin/ftp/fetch.c:1.208	Fri Dec 11 08:37:31 2015
+++ src/usr.bin/ftp/fetch.c	Sun Dec 13 14:06:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $	*/
+/*	$NetBSD: fetch.c,v 1.209 2015/12/13 14:06:13 tron Exp $	*/
 
 /*-
  * Copyright (c) 1997-2015 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.208 2015/12/11 08:37:31 tron Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.209 2015/12/13 14:06:13 tron Exp $");
 #endif /* not lint */
 
 /*
@@ -763,13 +763,17 @@ fetch_url(const char *url, const char *p
 			}
 
 			if (verbose && res0->ai_next) {
+#ifdef INET6
 				if(res->ai_family == AF_INET6) {
 					fprintf(ttyout, "Trying [%s]:%s ...\n",
 					    hname, sname);
 				} else {
+#endif
 					fprintf(ttyout, "Trying %s:%s ...\n",
 					    hname, sname);
+#ifdef INET6
 				}
+#endif
 			}
 
 			s = socket(res->ai_family, SOCK_STREAM,

Index: src/usr.bin/ftp/ftp.c
diff -u src/usr.bin/ftp/ftp.c:1.165 src/usr.bin/ftp/ftp.c:1.166
--- src/usr.bin/ftp/ftp.c:1.165	Fri Dec 11 08:37:31 2015
+++ src/usr.bin/ftp/ftp.c	Sun Dec 13 14:06:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $	*/
+/*	$NetBSD: ftp.c,v 1.166 2015/12/13 14:06:13 tron Exp $	*/
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c	8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.165 2015/12/11 08:37:31 tron Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.166 2015/12/13 14:06:13 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -200,13 +200,17 @@ hookup(const char *host, const char *por
 		}
 		if (verbose && res0->ai_next) {
 				/* if we have multiple possibilities */
+#ifdef INET6
 			if(res->ai_family == AF_INET6) {
 				fprintf(ttyout, "Trying [%s]:%s ...\n", hname,
 				    sname);
 			} else {
+#endif
 				fprintf(ttyout, "Trying %s:%s ...\n", hname,
 				    sname);
+#ifdef INET6
 			}
+#endif
 		}
 		s = socket(res->ai_family, SOCK_STREAM, res->ai_protocol);
 		if (s < 0) {

Reply via email to