summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>2001-12-03 17:42:02 +0000
committerjhay <jhay@FreeBSD.org>2001-12-03 17:42:02 +0000
commit06c2f4bca377acf4af84b18bcb4ea609e2a687ef (patch)
tree7bb83ab8ca62fba3669b7bdec33a867b04a7af8e
parent8b6f6e9487a28169a664f628114a3cf9a1de1819 (diff)
downloadFreeBSD-src-06c2f4bca377acf4af84b18bcb4ea609e2a687ef.zip
FreeBSD-src-06c2f4bca377acf4af84b18bcb4ea609e2a687ef.tar.gz
Protect variables and function prototypes that are only used in the INET6
case with an ifdef INET6. This make the fixit floppy compile again. Reviewed by: markm
-rw-r--r--contrib/telnet/telnet/commands.c8
-rw-r--r--crypto/telnet/telnet/commands.c8
2 files changed, 14 insertions, 2 deletions
diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c
index f4f45b2..dba2b8e 100644
--- a/contrib/telnet/telnet/commands.c
+++ b/contrib/telnet/telnet/commands.c
@@ -104,7 +104,9 @@ static char _hostname[MAXHOSTNAMELEN];
static int help(int, char **);
static int call(intrtn_t, ...);
static void cmdrc(char *, char *);
+#ifdef INET6
static int switch_af(struct addrinfo **);
+#endif
static int togglehelp(void);
static int send_tncmd(void (*)(int, int), const char *, char *);
static int setmod(int);
@@ -2336,7 +2338,9 @@ tn(int argc, char *argv[])
hostname = _hostname;
}
res0 = res;
+ #ifdef INET6
af_again:
+ #endif
if (srcroute != 0) {
static char hostbuf[BUFSIZ];
@@ -2835,10 +2839,12 @@ static int
sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, int *optp)
{
static char buf[1024 + ALIGNBYTES]; /*XXX*/
- struct cmsghdr *cmsg;
char *cp, *cp2, *lsrp, *ep;
struct sockaddr_in *_sin;
+#ifdef INET6
struct sockaddr_in6 *sin6;
+ struct cmsghdr *cmsg;
+#endif
struct addrinfo hints, *res;
int error;
char c;
diff --git a/crypto/telnet/telnet/commands.c b/crypto/telnet/telnet/commands.c
index f4f45b2..dba2b8e 100644
--- a/crypto/telnet/telnet/commands.c
+++ b/crypto/telnet/telnet/commands.c
@@ -104,7 +104,9 @@ static char _hostname[MAXHOSTNAMELEN];
static int help(int, char **);
static int call(intrtn_t, ...);
static void cmdrc(char *, char *);
+#ifdef INET6
static int switch_af(struct addrinfo **);
+#endif
static int togglehelp(void);
static int send_tncmd(void (*)(int, int), const char *, char *);
static int setmod(int);
@@ -2336,7 +2338,9 @@ tn(int argc, char *argv[])
hostname = _hostname;
}
res0 = res;
+ #ifdef INET6
af_again:
+ #endif
if (srcroute != 0) {
static char hostbuf[BUFSIZ];
@@ -2835,10 +2839,12 @@ static int
sourceroute(struct addrinfo *ai, char *arg, char **cpp, int *lenp, int *protop, int *optp)
{
static char buf[1024 + ALIGNBYTES]; /*XXX*/
- struct cmsghdr *cmsg;
char *cp, *cp2, *lsrp, *ep;
struct sockaddr_in *_sin;
+#ifdef INET6
struct sockaddr_in6 *sin6;
+ struct cmsghdr *cmsg;
+#endif
struct addrinfo hints, *res;
int error;
char c;
OpenPOWER on IntegriCloud