HP-UX port: continued to make struct ifreq.ifr_index conditional

This commit is contained in:
Gerhard Rieger 2008-09-29 21:16:07 +02:00
parent ba15b459f8
commit a0435920f6
1 changed files with 5 additions and 0 deletions

View File

@ -1869,8 +1869,13 @@ char *xiogetifname(int ind, char *val, int ins) {
#endif
#ifdef SIOCGIFNAME
if(Ioctl(s, SIOCGIFNAME, &ifr) < 0) {
#if HAVE_STRUCT_IFREQ_IFR_INDEX
Info3("ioctl(%d, SIOCGIFNAME, {..., ifr_index=%d, ...}: %s",
s, ifr.ifr_index, strerror(errno));
#elif HAVE_STRUCT_IFREQ_IFR_IFINDEX
Info3("ioctl(%d, SIOCGIFNAME, {..., ifr_ifindex=%d, ...}: %s",
s, ifr.ifr_ifindex, strerror(errno));
#endif
if (ins < 0) Close(s);
return NULL;
}