$OpenBSD: patch-pcaprub_c,v 1.1.1.1 2010/12/23 10:29:52 stephan Exp $
--- pcaprub.c.orig	Tue Dec 14 11:58:51 2010
+++ pcaprub.c	Tue Dec 14 12:02:43 2010
@@ -314,6 +314,7 @@ static VALUE
 rbpcap_dump(VALUE self, VALUE caplen, VALUE pktlen, VALUE packet)
 {
     rbpcap_t *rbp;
+    struct timeval tv;
     struct pcap_pkthdr pcap_hdr;
 
     if(TYPE(packet) != T_STRING)
@@ -325,7 +326,9 @@ rbpcap_dump(VALUE self, VALUE caplen, VALUE pktlen, VA
 
     Data_Get_Struct(self, rbpcap_t, rbp);
     
-    gettimeofday(&pcap_hdr.ts, NULL);
+    gettimeofday(&tv, NULL);
+    pcap_hdr.ts.tv_sec = tv.tv_sec; 
+    pcap_hdr.ts.tv_usec = tv.tv_usec; 
     pcap_hdr.caplen = NUM2UINT(caplen);
     pcap_hdr.len = NUM2UINT(pktlen);
 
@@ -489,10 +492,6 @@ Init_pcaprub()
     rb_define_const(rb_cPcap, "DLT_PPP_BSDOS", INT2NUM(DLT_PPP_BSDOS));
     rb_define_const(rb_cPcap, "DLT_IEEE802_11", INT2NUM(DLT_IEEE802_11));
     rb_define_const(rb_cPcap, "DLT_IEEE802_11_RADIO", INT2NUM(DLT_IEEE802_11_RADIO));
-    rb_define_const(rb_cPcap, "DLT_IEEE802_11_RADIO_AVS", INT2NUM(DLT_IEEE802_11_RADIO_AVS));
-    rb_define_const(rb_cPcap, "DLT_LINUX_SLL", INT2NUM(DLT_LINUX_SLL));
-    rb_define_const(rb_cPcap, "DLT_PRISM_HEADER", INT2NUM(DLT_PRISM_HEADER));
-    rb_define_const(rb_cPcap, "DLT_AIRONET_HEADER", INT2NUM(DLT_AIRONET_HEADER));
 
     rb_define_singleton_method(rb_cPcap, "new", rbpcap_new_s, 0);
 
