From a0435920f644d2a256c0d44997e95bcd63a945a6 Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Mon, 29 Sep 2008 21:16:07 +0200 Subject: [PATCH] HP-UX port: continued to make struct ifreq.ifr_index conditional --- xio-socket.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xio-socket.c b/xio-socket.c index 41fb523..6fa4125 100644 --- a/xio-socket.c +++ b/xio-socket.c @@ -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; }