Fix getif() to work under 4.3bsd and later
This commit is contained in:
parent
4dde4205e1
commit
4f5241c655
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user