diff options
author | guy <guy> | 2002-02-22 11:49:13 +0000 |
---|---|---|
committer | guy <guy> | 2002-02-22 11:49:13 +0000 |
commit | c9f3b70d22a4ae301f8f5c86f87c9f5f5a9229de (patch) | |
tree | caa7a2c1ca901043c94579681d9b6a08b91dd57d /pcap-dlpi.c | |
parent | 6c3ce3a573206751dd76ab8a129c79b1859af878 (diff) |
The "sbh_timestamp" member of an "sb_hdr" structure isn't necessarily a
"struct timeval" - on Solaris 7 and 8, when compiling in LP64 or I32LPx
mode, it's a "struct timeval32" (presumably so that bufmod doesn't have
to worry about whether the stream is being read by a 32-bit program or a
64-bit program). Set the "struct timeval" "pkthdr.ts" by copying the
individual members rather than by doing a structure assignment.
Diffstat (limited to 'pcap-dlpi.c')
-rw-r--r-- | pcap-dlpi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap-dlpi.c b/pcap-dlpi.c index 3208ce3..fd31af6 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.74 2001-12-10 07:14:15 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.75 2002-02-22 11:49:13 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -223,7 +223,8 @@ pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user) ++p->md.stat.ps_recv; if (bpf_filter(fcode, pk, origlen, caplen)) { #ifdef HAVE_SYS_BUFMOD_H - pkthdr.ts = sbp->sbh_timestamp; + pkthdr.ts.tv_sec = sbp->sbh_timestamp.tv_sec; + pkthdr.ts.tv_usec = sbp->sbh_timestamp.tv_usec; #else (void)gettimeofday(&pkthdr.ts, NULL); #endif |