Permalink
Browse files

Fix for #27 (from wowczarek fork)

  • Loading branch information...
wowczarek committed Oct 14, 2016
1 parent 687bcb1 commit d55e03168e3b9203cb2b8ec2d21081d34a9066a5
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/dep/net.c
View
@@ -431,9 +431,12 @@ static int getInterfaceIndex(char *ifaceName)
if (ioctl(sockfd, SIOCGIFINDEX, &ifr) < 0) {
DBGV("failed to request hardware address for %s", ifaceName);
return -1;
close(sockfd);
}
close(sockfd);
#if defined(HAVE_STRUCT_IFREQ_IFR_INDEX)
return ifr.ifr_index;
#elif defined(HAVE_STRUCT_IFREQ_IFR_IFINDEX)

0 comments on commit d55e031

Please sign in to comment.