mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 03:19:02 +00:00
Update libpcap to 1.7.3, partially addressing #34
This commit is contained in:
@@ -28,11 +28,6 @@
|
||||
* dependent values so we can print the dump file on any architecture.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.183 2008-12-23 20:13:29 guy Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
@@ -223,14 +218,14 @@ pcap_t* pcap_hopen_offline_with_tstamp_precision(intptr_t osfd, u_int precision,
|
||||
FILE *file;
|
||||
|
||||
fd = _open_osfhandle(osfd, _O_RDONLY);
|
||||
if ( fd < 0 )
|
||||
if ( fd < 0 )
|
||||
{
|
||||
snprintf(errbuf, PCAP_ERRBUF_SIZE, pcap_strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
file = _fdopen(fd, "rb");
|
||||
if ( file == NULL )
|
||||
if ( file == NULL )
|
||||
{
|
||||
snprintf(errbuf, PCAP_ERRBUF_SIZE, pcap_strerror(errno));
|
||||
return NULL;
|
||||
@@ -349,6 +344,11 @@ found:
|
||||
*/
|
||||
p->oneshot_callback = pcap_oneshot;
|
||||
|
||||
/*
|
||||
* Savefiles never require special BPF code generation.
|
||||
*/
|
||||
p->bpf_codegen_flags = 0;
|
||||
|
||||
p->activated = 1;
|
||||
|
||||
return (p);
|
||||
|
||||
Reference in New Issue
Block a user