Description: Fix segfault on amd64
 Upstream is not active.
Author: Dennis Krzyzaniak <ebrosius@netgarage.org>
Last-Update: 2010-05-17

--- ipgrab-0.9.10.orig/src/datalink.c
+++ ipgrab-0.9.10/src/datalink.c
@@ -35,6 +35,7 @@
 #include "payload.h"
 #include "stats.h"
 #include "dynports.h"
+#include "time.h"
 
 extern struct arg_t * my_args;
 extern int            packet_displayed;
@@ -158,9 +159,15 @@ void datalink(int linktype, struct timev
   /*
    * Print time stamp is human readable format.
    */
-
+#if 0
+  /* This results in a segfault on amd64.
+     Changed to thread-safe ctime_r call.
+     Dennis Krzyzaniak 2010-05-17 */
   snprintf(packet.timestamp, PACKET_TIMESTAMP_LEN, "%s", 
 	   ctime ( ( const time_t * ) &ts.tv_sec ) );
+#else
+  ctime_r((const time_t*) &(ts.tv_sec), packet.timestamp);
+#endif
 
   /*
    * If we're in minimal mode, start off with the count number
