SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
35
net/ssldump/patches/patch-base_pcap-snoop_c
Normal file
35
net/ssldump/patches/patch-base_pcap-snoop_c
Normal file
|
@ -0,0 +1,35 @@
|
|||
Remove pointless cast to fix build with base-gcc:
|
||||
|
||||
base/pcap-snoop.c:100: error: initializer element is not constant
|
||||
|
||||
Index: base/pcap-snoop.c
|
||||
--- base/pcap-snoop.c.orig
|
||||
+++ base/pcap-snoop.c
|
||||
@@ -51,7 +51,9 @@
|
||||
|
||||
#include <pcap.h>
|
||||
#include <unistd.h>
|
||||
+#ifdef HAVE_PCAP_BPF_H
|
||||
#include <pcap-bpf.h>
|
||||
+#endif
|
||||
#ifndef _WIN32
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
@@ -95,7 +97,7 @@ int conn_freq = 100; // Number of packets after which
|
||||
// cleaning is performed
|
||||
int conn_ttl = 100; // TTL of inactive connections in connection pool
|
||||
struct timeval last_packet_seen_time = // Timestamp of the last packet of the
|
||||
- (struct timeval) {0}; // last block of conn_freq packets seen
|
||||
+ {0}; // last block of conn_freq packets seen
|
||||
|
||||
logger_mod *logger=NULL;
|
||||
|
||||
@@ -430,7 +432,7 @@ int main(argc,argv)
|
||||
|
||||
if(!file){
|
||||
if(!interface_name){
|
||||
- if(pcap_findalldevs(&interfaces,errbuf)==-1) {
|
||||
+ if(pcap_findalldevs(&interfaces,errbuf)==-1 || interfaces == NULL) {
|
||||
fprintf(stderr,"PCAP: %s\n",errbuf);
|
||||
err_exit("Aborting",-1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue