diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-07-04 02:46:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-07-04 02:46:22 +0000 |
commit | f6f4def1a28b6a3528e0391a5eccd9c403881765 (patch) | |
tree | a63db68a37185ce9f718e4e225b64ba6cb6dfbb4 /interface.c | |
parent | d3ce90c880ce40858ff90813738335c8d73dea8d (diff) | |
download | fetchmail-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.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)) { |