$OpenBSD: patch-ifdata_c,v 1.2 2014/03/09 22:19:35 sthen Exp $
--- ifdata.c.orig	Tue Dec 31 17:35:43 2013
+++ ifdata.c	Sun Mar  9 22:14:22 2014
@@ -29,6 +29,11 @@
    #include <sys/sockio.h>
 #endif
 
+#if defined(__OpenBSD__)
+   #define s6_addr16 __u6_addr.__u6_addr16
+   #include <net/if.h>
+#endif
+
 #include <netinet/in.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -235,7 +240,7 @@ struct sockaddr *if_network(const char *iface) {
 	return saddr;
 }
 
-int if_mtu(const char *iface) {
+int ifd_if_mtu(const char *iface) {
 	static struct ifreq req;
 
 	if (do_socket_ioctl(iface, SIOCGIFMTU, &req, NULL, PRINT_ERROR))
@@ -403,7 +408,7 @@ void please_do(int ndo, int *todo, const char *ifname)
 				print_addr(if_bcast(ifname, &req));
 				break;
 			case DO_PMTU:
-				printf("%d", if_mtu(ifname));
+				printf("%d", ifd_if_mtu(ifname));
 				break;
 			case DO_PNETWORK:
 				print_addr(if_network(ifname));
@@ -415,7 +420,7 @@ void please_do(int ndo, int *todo, const char *ifname)
 				printf(" ");
 				print_addr(if_bcast(ifname, &req));
 				printf(" ");
-				printf("%d", if_mtu(ifname));
+				printf("%d", ifd_if_mtu(ifname));
 				break;
 #if defined(__linux__)
 			case DO_SINPACKETS:
