Ticket #57757: fix-build.patch

File fix-build.patch, 1.5 KB (added by agm650, 6 years ago)
  • ./Makefile.PL

    diff -up ./Makefile.PL.tv ./Makefile.PL
    old new REASON 
    106106# We also store the list of available functions in a file for skipping the
    107107# corresponding tests.
    108108my @funcs = have_functions(find_functions());
    109 $options{DEFINE} .= cpp_defines(@funcs);
     109$options{DEFINE} .= cpp_defines(@funcs). "-DHAVE_PCAP_SETSAMPLING";
    110110open(FUNCS, '>funcs.txt') or warn "warning: can't write 'funcs.txt': $!\n";
    111111print FUNCS join("\n", @funcs), "\n";
    112112close(FUNCS);
  • ./stubs.inc

    diff -up ./Pcap.xs.tv ./Pcap.xs
    diff -up ./stubs.inc.tv ./stubs.inc
    old new int pcap_parsesrcstr(const char *source, 
    354354#ifdef _MSC_VER
    355355#pragma message( "Warning: the function pcap_open() is not available" )
    356356#endif
    357 struct pcap_rmtauth {
    358     int type;
    359     char *username;
    360     char *password;
    361 };
    362357
    363358pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err);
    364359pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *err) {
    HANDLE pcap_getevent(pcap_t *p) { 
    511511#ifdef _MSC_VER
    512512#pragma message( "Warning: the function pcap_setsampling() is not available" )
    513513#endif
     514#if 0
    514515struct pcap_samp {
    515516    int method;
    516517    int value;
    struct pcap_samp *pcap_setsampling(pcap_ 
    522523    return NULL;
    523524}
    524525#endif
     526#endif
    525527
    526528
    527529/*