mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
HP-UX port: continued to make struct ifreq.ifr_index conditional
This commit is contained in:
parent
ba15b459f8
commit
a0435920f6
1 changed files with 5 additions and 0 deletions
|
@ -1869,8 +1869,13 @@ char *xiogetifname(int ind, char *val, int ins) {
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIOCGIFNAME
|
#ifdef SIOCGIFNAME
|
||||||
if(Ioctl(s, SIOCGIFNAME, &ifr) < 0) {
|
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",
|
Info3("ioctl(%d, SIOCGIFNAME, {..., ifr_ifindex=%d, ...}: %s",
|
||||||
s, ifr.ifr_ifindex, strerror(errno));
|
s, ifr.ifr_ifindex, strerror(errno));
|
||||||
|
#endif
|
||||||
if (ins < 0) Close(s);
|
if (ins < 0) Close(s);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue