| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | Description: Use strlcat provided by libbsdAuthor: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>Forwarded: NoLast-Update: 2017-11-18--- a/configure.in+++ b/configure.in@@ -25,6 +25,7 @@  AC_CHECK_LIB(z, gzopen, [], AC_MSG_ERROR([libz not found],1)) AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_MSG_ERROR([libbzip2 not found],1))+AC_CHECK_LIB(bsd, strlcat, [], AC_MSG_ERROR([libsd not found],1))  # Check for inet_ntoa in -lnsl if not found (Solaris) AC_CHECK_FUNCS(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa, [], AC_MSG_ERROR([inet_ntoa not found],1)))--- a/bgpdump_lib.c+++ b/bgpdump_lib.c@@ -37,6 +37,7 @@ #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h>+#include <bsd/string.h>  #include <zlib.h> #include <assert.h>@@ -78,7 +79,7 @@ static    struct aspath *asn32_merge_paths(struct aspath *path, struct aspath *newpath); static    void asn32_expand_16_to_32(char *dst, char *src, int len); -#if defined(linux)+#if 0 static    size_t strlcat(char *dst, const char *src, size_t size); #endif @@ -1755,7 +1756,7 @@   } } -#if defined(linux)+#if 0 size_t strlcat(char *dst, const char *src, size_t size) {   if (strlen (dst) + strlen (src) >= size)     return -1;
 |