use-strlcat.patch 724 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. @@ -78,7 +79,7 @@
  15. BGPDUMP_TABLE_DUMP_V2_PEER_INDEX_TABLE *table_dump_v2_peer_index_table = NULL;
  16. -#if defined(linux)
  17. +#if 0
  18. static size_t strlcat(char *dst, const char *src, size_t size);
  19. #endif
  20. @@ -1482,7 +1483,7 @@
  21. }
  22. }
  23. -#if defined(linux)
  24. +#if 0
  25. size_t strlcat(char *dst, const char *src, size_t size) {
  26. if (strlen (dst) + strlen (src) >= size)
  27. return -1;