File: 14_obsolete_time.patch

package info (click to toggle)
dsniff 2.4b1%2Bdebian-35
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,096 kB
  • sloc: ansic: 10,803; sh: 152; makefile: 127
file content (36 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Author: Luciano Bello <luciano@linux.org.ar>
Description: According to /usr/include/time.h, CLK_TCK is the 
"obsolete POSIX.1-1988 name" for CLOCKS_PER_SEC.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420944
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/

--- a/sshow.c
+++ b/sshow.c
@@ -224,7 +224,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);
 
@@ -273,7 +273,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);
 	
@@ -302,7 +302,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 &&