summaryrefslogtreecommitdiff
path: root/ext/socket/ifaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/ifaddr.c')
-rw-r--r--ext/socket/ifaddr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/ifaddr.c b/ext/socket/ifaddr.c
index 446fe20..e5eb48b 100644
--- a/ext/socket/ifaddr.c
+++ b/ext/socket/ifaddr.c
@@ -135,6 +135,7 @@ ifaddr_name(VALUE self)
* Returns the interface index of _ifaddr_.
*/
+#ifdef HAVE_IF_NAMETOINDEX
static VALUE
ifaddr_ifindex(VALUE self)
{
@@ -146,6 +147,9 @@ ifaddr_ifindex(VALUE self)
}
return UINT2NUM(ifindex);
}
+#else
+#define ifaddr_ifindex rb_f_notimplement
+#endif
/*
* call-seq: