aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/if_index.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/if_index.c')
-rw-r--r--sysdeps/unix/sysv/linux/if_index.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c
index c0ffbcedf6..36863db486 100644
--- a/sysdeps/unix/sysv/linux/if_index.c
+++ b/sysdeps/unix/sysv/linux/if_index.c
@@ -26,6 +26,7 @@
#include <bits/libc-lock.h>
/* Try to get a socket to talk to the kernel. */
+#if defined SIOGIFINDEX || defined SIOGIFNAME
static int
opensock (void)
{
@@ -63,6 +64,7 @@ opensock (void)
__libc_lock_unlock (lock);
return fd;
}
+#endif
unsigned int
if_nametoindex (const char *ifname)