#! /bin/sh /usr/share/dpatch/dpatch-run
## 14_obsolete_time.dpatch by Luciano Bello <luciano@linux.org.ar>
##
## DP: According to /usr/include/time.h, CLK_TCK is the 
## DP: "obsolete POSIX.1-1988 name" for CLOCKS_PER_SEC.
## DP: Closes #420944


@DPATCH@
diff -urNad trunk~/sshow.c trunk/sshow.c
--- trunk~/sshow.c	2007-06-22 15:48:00.000000000 -0300
+++ trunk/sshow.c	2007-08-10 19:03:30.000000000 -0300
@@ -222,7 +222,7 @@
 	if (debug)
 		printf("- %s -> %s: DATA (%s bytes, %.2f seconds)\n",
 			s_saddr(ts), s_daddr(ts), s_range(plain_range),
-			(float)delay / CLK_TCK);
+			(float)delay / CLOCKS_PER_SEC);
 	if (debug > 1)
 		print_data(&ts->server, cipher_size);
 
@@ -270,7 +270,7 @@
 	if (debug)
 		printf("- %s <- %s: DATA (%s bytes, %.2f seconds)\n",
 		       s_saddr(ts), s_daddr(ts), s_range(plain_range),
-		       (float)delay / CLK_TCK);
+		       (float)delay / CLOCKS_PER_SEC);
 	if (debug > 1)
 		print_data(&ts->client, cipher_size);
 	
@@ -299,7 +299,7 @@
 	
 	if (session->state == 1 &&
 #ifdef USE_TIMING
-	    now - get_history(session, 2)->timestamp >= CLK_TCK &&
+	    now - get_history(session, 2)->timestamp >= CLOCKS_PER_SEC &&
 #endif
 	    session->protocol == 1 &&
 	    (session->history.directions & 7) == 5 &&
