Windows does not support gettimeofday(). Use 0 as a workaround for now.

svn path=/trunk/; revision=28162
This commit is contained in:
Michael Tüxen 2009-04-26 20:01:56 +00:00
parent b09b4f4084
commit 120bf41606
1 changed files with 4 additions and 0 deletions

View File

@ -418,9 +418,13 @@ libpcap_write_interface_statistics_block(FILE *fp,
guint64 counter;
gboolean stats_retrieved;
#ifdef _WIN32
timestamp = 0; /* FIXME */
#else
gettimeofday(&now, NULL);
timestamp = (guint64)(now.tv_sec) * 1000000 +
(guint64)(now.tv_usec);
#endif
if (pcap_stats(pd, &stats) < 0) {
stats_retrieved = FALSE;
g_warning("pcap_stats() failed.");