1
0

use-strlcat.patch 802 B

123456789101112131415161718192021222324252627282930313233
  1. Description: Use strlcat provided by libbsd
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Forwarded: No
  4. Last-Update: 2016-07-21
  5. --- a/bgpdump_lib.c
  6. +++ b/bgpdump_lib.c
  7. @@ -37,6 +37,7 @@
  8. #include <netinet/in.h>
  9. #include <sys/socket.h>
  10. #include <arpa/inet.h>
  11. +#include <bsd/string.h>
  12. #include <zlib.h>
  13. #include <assert.h>
  14. @@ -77,7 +78,7 @@
  15. static struct aspath *asn32_merge_paths(struct aspath *path, struct aspath *newpath);
  16. static void asn32_expand_16_to_32(char *dst, char *src, int len);
  17. -#if defined(linux)
  18. +#if 0
  19. static size_t strlcat(char *dst, const char *src, size_t size);
  20. #endif
  21. @@ -1689,7 +1690,7 @@
  22. }
  23. }
  24. -#if defined(linux)
  25. +#if 0
  26. size_t strlcat(char *dst, const char *src, size_t size) {
  27. if (strlen (dst) + strlen (src) >= size)
  28. return -1;