summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/net/if_nameindex.c8
-rw-r--r--sys/net/if.h4
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/net/if_nameindex.c b/lib/libc/net/if_nameindex.c
index 3675a2a4507..c5a771869bc 100644
--- a/lib/libc/net/if_nameindex.c
+++ b/lib/libc/net/if_nameindex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nameindex.c,v 1.9 2002/03/07 22:40:23 millert Exp $ */
+/* $OpenBSD: if_nameindex.c,v 1.10 2010/09/24 13:29:29 claudio Exp $ */
/* $KAME: if_nameindex.c,v 1.7 2000/11/24 08:17:20 itojun Exp $ */
/*-
@@ -138,3 +138,9 @@ out:
freeifaddrs(ifaddrs);
return(ifni);
}
+
+void
+if_freenameindex(struct if_nameindex *ptr)
+{
+ free(ptr);
+}
diff --git a/sys/net/if.h b/sys/net/if.h
index 8409aa44c51..a04f86dbc31 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.119 2010/09/23 10:49:55 dlg Exp $ */
+/* $OpenBSD: if.h,v 1.120 2010/09/24 13:29:29 claudio Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -663,8 +663,8 @@ __BEGIN_DECLS
unsigned int if_nametoindex(const char *);
char *if_indextoname(unsigned int, char *);
struct if_nameindex *if_nameindex(void);
+void if_freenameindex(struct if_nameindex *);
__END_DECLS
-#define if_freenameindex(x) free(x)
#endif
#include <net/if_arp.h>