From 017c240336a375aebd52ec30cf341a207f1c12a4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 16 Oct 2018 00:15:38 -0700 Subject: Provide out own strlcpy() and strlcat() routines if necessary. We now depend on the *full* semantics of those routines, including the return value being usable for truncation checks. If we're building for a UN*X that has them, define pcap_strl{cpy,cat} to be strl{cpy,cat}. If we're building for Windows using MSVC, define pcap_strl{cpy,cat}, not strl{cpy,cat}. Otherwise, build our won versions of pcap_strl{cpy,cat} from BSD-derived source code. --- pcap-libdlpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pcap-libdlpi.c') diff --git a/pcap-libdlpi.c b/pcap-libdlpi.c index af167212..aef18fa2 100644 --- a/pcap-libdlpi.c +++ b/pcap-libdlpi.c @@ -80,7 +80,7 @@ list_interfaces(const char *linkname, void *arg) lwp->lw_err = ENOMEM; return (B_TRUE); } - (void) strlcpy(entry->linkname, linkname, DLPI_LINKNAME_MAX); + (void) pcap_strlcpy(entry->linkname, linkname, DLPI_LINKNAME_MAX); if (lwp->lw_list == NULL) { lwp->lw_list = entry; -- cgit v1.2.1