Remove the include of <sys/time.h> from "file.h" - it's neither
necessary nor sufficient if you're using "struct tm" (on many, perhaps most, perhaps even all modern UNIXes, <sys/time.h> includes <time.h>, which declares "struct tm", but that's not necessarily the case on non-UNIX systems). Include <time.h> in "file.c", to declare "struct tm". Don't use PCAP_ERRBUF_SIZE to declare a message string buffer - that won't work if you don't have "libpcap". svn path=/trunk/; revision=549
This commit is contained in:
parent
b9ed78d5eb
commit
bf9895bb26
8
file.c
8
file.c
|
@ -1,7 +1,7 @@
|
|||
/* file.c
|
||||
* File I/O routines
|
||||
*
|
||||
* $Id: file.c,v 1.79 1999/08/22 02:52:42 guy Exp $
|
||||
* $Id: file.c,v 1.80 1999/08/22 07:19:27 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -35,6 +35,8 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
@ -198,7 +200,7 @@ read_cap_file(capture_file *cf) {
|
|||
size_t msg_len;
|
||||
char *errmsg;
|
||||
char errmsg_errno[1024+1];
|
||||
gchar err_str[PCAP_ERRBUF_SIZE];
|
||||
gchar err_str[2048+1];
|
||||
|
||||
if ((name_ptr = (gchar *) strrchr(cf->filename, '/')) == NULL)
|
||||
name_ptr = cf->filename;
|
||||
|
@ -267,7 +269,7 @@ read_cap_file(capture_file *cf) {
|
|||
errmsg = errmsg_errno;
|
||||
break;
|
||||
}
|
||||
snprintf(err_str, PCAP_ERRBUF_SIZE, errmsg);
|
||||
snprintf(err_str, sizeof err_str, errmsg);
|
||||
simple_dialog(ESD_TYPE_WARN, NULL, err_str);
|
||||
return (err);
|
||||
} else
|
||||
|
|
7
file.h
7
file.h
|
@ -1,7 +1,7 @@
|
|||
/* file.h
|
||||
* Definitions for file structures and routines
|
||||
*
|
||||
* $Id: file.h,v 1.39 1999/08/22 00:47:43 guy Exp $
|
||||
* $Id: file.h,v 1.40 1999/08/22 07:19:28 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -30,10 +30,6 @@
|
|||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifndef __WTAP_H__
|
||||
#include "wiretap/wtap.h"
|
||||
#endif
|
||||
|
@ -44,7 +40,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __DFILTER_H__
|
||||
#include "dfilter.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue