aboutsummaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-07-04 02:46:22 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-07-04 02:46:22 +0000
commitf6f4def1a28b6a3528e0391a5eccd9c403881765 (patch)
treea63db68a37185ce9f718e4e225b64ba6cb6dfbb4 /interface.c
parentd3ce90c880ce40858ff90813738335c8d73dea8d (diff)
downloadfetchmail-f6f4def1a28b6a3528e0391a5eccd9c403881765.tar.gz
fetchmail-f6f4def1a28b6a3528e0391a5eccd9c403881765.tar.bz2
fetchmail-f6f4def1a28b6a3528e0391a5eccd9c403881765.zip
Don't rely on snprintf.
svn path=/trunk/; revision=3393
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c7
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))
{