diff options
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/interface.c b/interface.c index 1d61b367..682b788d 100644 --- a/interface.c +++ b/interface.c @@ -270,7 +270,12 @@ get_ifinfo(const char *ifname, ifinfo_t *ifinfo) { kvm_read(kvmfd, ifnet_addr, &ifnet, sizeof(ifnet)); kvm_read(kvmfd, (unsigned long) ifnet.if_name, tname, sizeof tname); - snprintf(tname, sizeof tname - 1, "%s%d", tname, ifnet.if_unit); +#ifdef HAVE_SNPRINTF + snprintf(tname, sizeof tname - 1, +#else + sprintf(tname, +#endif + "%s%d", tname, ifnet.if_unit); if (!strcmp(tname, iname)) { |