Net-Pcap-0.18-Fix-build-with-libpcap-1.9.0.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff -up ./Makefile.PL.tv ./Makefile.PL
  2. --- ./Makefile.PL.tv 2018-09-21 10:32:09.165570705 +0200
  3. +++ ./Makefile.PL 2018-09-21 10:45:39.096591301 +0200
  4. @@ -106,7 +106,7 @@ REASON
  5. # We also store the list of available functions in a file for skipping the
  6. # corresponding tests.
  7. my @funcs = have_functions(find_functions());
  8. -$options{DEFINE} .= cpp_defines(@funcs);
  9. +$options{DEFINE} .= cpp_defines(@funcs). "-DHAVE_PCAP_SETSAMPLING";
  10. open(FUNCS, '>funcs.txt') or warn "warning: can't write 'funcs.txt': $!\n";
  11. print FUNCS join("\n", @funcs), "\n";
  12. close(FUNCS);
  13. diff -up ./Pcap.xs.tv ./Pcap.xs
  14. diff -up ./stubs.inc.tv ./stubs.inc
  15. --- ./stubs.inc.tv 2018-09-21 10:30:08.653034412 +0200
  16. +++ ./stubs.inc 2018-09-21 10:46:41.339897943 +0200
  17. @@ -354,11 +354,6 @@ int pcap_parsesrcstr(const char *source,
  18. #ifdef _MSC_VER
  19. #pragma message( "Warning: the function pcap_open() is not available" )
  20. #endif
  21. -struct pcap_rmtauth {
  22. - int type;
  23. - char *username;
  24. - char *password;
  25. -};
  26. pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
  27. pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
  28. @@ -511,6 +511,7 @@ HANDLE pcap_getevent(pcap_t *p) {
  29. #ifdef _MSC_VER
  30. #pragma message( "Warning: the function pcap_setsampling() is not available" )
  31. #endif
  32. +#if 0
  33. struct pcap_samp {
  34. int method;
  35. int value;
  36. @@ -522,6 +523,7 @@ struct pcap_samp *pcap_setsampling(pcap_
  37. return NULL;
  38. }
  39. #endif
  40. +#endif
  41. /*