Fix getif() to work under 4.3bsd and later

This commit is contained in:
Paul Traina 1996-01-23 09:44:45 +00:00
parent 4dde4205e1
commit 4f5241c655
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13582

View File

@ -91,13 +91,12 @@ getif(s, addrp)
maxmatch = m;
ifrmax = ifrq;
}
/* XXX - Could this be just #ifndef IFNAMSIZ instead? -gwr */
#if (BSD - 0) < 43
#ifndef IFNAMSIZ
/* BSD not defined or earlier than 4.3 */
incr = sizeof(*ifrq);
#else /* NetBSD */
#else
incr = ifrq->ifr_addr.sa_len + IFNAMSIZ;
#endif /* NetBSD */
#endif
p += incr;
len -= incr;