diff options
Diffstat (limited to 'agent/interfaces.c')
-rw-r--r-- | agent/interfaces.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/agent/interfaces.c b/agent/interfaces.c index 4cd988c..3590e0d 100644 --- a/agent/interfaces.c +++ b/agent/interfaces.c @@ -373,6 +373,7 @@ get_local_ips_ioctl (gboolean include_loopback) static guint get_local_if_index_by_addr_ioctl (NiceAddress *addr) { +#ifdef HAVE_IFR_IFINDEX gint sockfd; gint size = 0; struct ifreq *ifr; @@ -427,6 +428,11 @@ get_local_if_index_by_addr_ioctl (NiceAddress *addr) close (sockfd); return if_index; +#else + g_critical ("getifaddrs() should not fail on a platform that doesn't" + " include ifr_index in the struct ifreq. Please report the bug."); + return 0; +#endif } #ifdef HAVE_GETIFADDRS |