From f6f4def1a28b6a3528e0391a5eccd9c403881765 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 4 Jul 2001 02:46:22 +0000 Subject: Don't rely on snprintf. svn path=/trunk/; revision=3393 --- interface.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'interface.c') 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)) { -- cgit v1.2.3