Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp Kludge around non 4.4BSD systems that don't have...



details:   https://anonhg.NetBSD.org/src/rev/36ba2cbf7d82
branches:  trunk
changeset: 474539:36ba2cbf7d82
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 10 20:46:42 1999 +0000

description:
Kludge around non 4.4BSD systems that don't have a length field in struct
sockaddr*.

diffstat:

 usr.bin/ftp/ftp.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 056d7f039458 -r 36ba2cbf7d82 usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Sat Jul 10 20:40:23 1999 +0000
+++ b/usr.bin/ftp/ftp.c Sat Jul 10 20:46:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp.c,v 1.51 1999/07/10 19:41:01 christos Exp $        */
+/*     $NetBSD: ftp.c,v 1.52 1999/07/10 20:46:42 christos Exp $        */
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c      8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.51 1999/07/10 19:41:01 christos Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.52 1999/07/10 20:46:42 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -117,13 +117,22 @@
 
 union sockunion {
        struct sockinet {
+#ifdef BSD4_4
                u_char si_len;
                u_char si_family;
+#else
+               u_short si_family;
+#endif
                u_short si_port;
+#ifndef BSD4_4
+               u_char  si_pad[sizeof(struct sockaddr_in6) - sizeof(u_int)];
+               u_char  si_len;
+#endif
        } su_si;
        struct sockaddr_in  su_sin;
        struct sockaddr_in6 su_sin6;
 };
+
 #define su_len         su_si.si_len
 #define su_family      su_si.si_family
 #define su_port                su_si.si_port



Home | Main Index | Thread Index | Old Index