--- src/util.h.orig 2013-06-11 16:00:00.000000000 +0700 +++ src/util.h 2014-01-20 14:52:46.000000000 +0700 @@ -11,6 +11,8 @@ #define _UTIL_H_ #include "ip.h" +#include +#include /*- * The following macro is used to update an @@ -98,4 +100,8 @@ extern void ppp_util_ascify(char *buf, size_t max, const char *bytes, size_t len); +#if (__FreeBSD_version < 700000) + extern char *ether_ntoa_r(const struct ether_addr *n, char *a); +#endif + #endif --- src/util.c.orig 2013-06-11 16:00:00.000000000 +0700 +++ src/util.c 2014-01-20 14:51:48.000000000 +0700 @@ -19,6 +19,8 @@ #include #include #include +#include +#include /* * DEFINITIONS @@ -1531,3 +1533,19 @@ ppp_util_ascify(char *buf, size_t bsiz, *bp = '\0'; } +#if (__FreeBSD_version < 700000) +/* + * Convert a binary representation of an ethernet address to an ASCII string. + */ +char * +ether_ntoa_r(const struct ether_addr *n, char *a) +{ + int i; + + i = sprintf(a, "%02x:%02x:%02x:%02x:%02x:%02x", n->octet[0], + n->octet[1], n->octet[2], n->octet[3], n->octet[4], n->octet[5]); + if (i < 17) + return (NULL); + return (a); +} +#endif