39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
|
diff -Nur -x '*.orig' -x '*.rej' diald-1.0/diald.c mezzanine_patched_diald-1.0/diald.c
|
||
|
--- diald-1.0/diald.c 2001-06-16 13:51:39.000000000 -0600
|
||
|
+++ mezzanine_patched_diald-1.0/diald.c 2007-03-21 13:11:51.000000000 -0600
|
||
|
@@ -189,10 +189,10 @@
|
||
|
if (proxy.fd >= 0) FD_SET(proxy.fd, &readfds);
|
||
|
if (snoopfd >= 0) FD_SET(snoopfd, &readfds);
|
||
|
/* Compute the likely timeout for the next second boundary */
|
||
|
- ts = tstamp + PAUSETIME*CLK_TCK - ticks();
|
||
|
+ ts = tstamp + PAUSETIME*CLOCKS_PER_SEC - ticks();
|
||
|
if (ts < 0) ts = 0;
|
||
|
- timeout.tv_sec = ts/CLK_TCK;
|
||
|
- timeout.tv_usec = 1000*(ts%CLK_TCK)/CLK_TCK;
|
||
|
+ timeout.tv_sec = ts/CLOCKS_PER_SEC;
|
||
|
+ timeout.tv_usec = 1000*(ts%CLOCKS_PER_SEC)/CLOCKS_PER_SEC;
|
||
|
sel = select(256,&readfds,0,0,&timeout);
|
||
|
if (sel < 0 && errno == EBADF) {
|
||
|
PIPE *p;
|
||
|
@@ -278,7 +278,7 @@
|
||
|
/* check if ticks() has advanced a second since last check.
|
||
|
* This is immune to wall clock skew because we use the ticks count.
|
||
|
*/
|
||
|
- ts = tstamp + PAUSETIME*CLK_TCK - ticks();
|
||
|
+ ts = tstamp + PAUSETIME*CLOCKS_PER_SEC - ticks();
|
||
|
if (ts <= 0) {
|
||
|
tstamp = ticks();
|
||
|
fire_timers();
|
||
|
diff -Nur -x '*.orig' -x '*.rej' diald-1.0/timer.c mezzanine_patched_diald-1.0/timer.c
|
||
|
--- diald-1.0/timer.c 2001-06-16 14:16:22.000000000 -0600
|
||
|
+++ mezzanine_patched_diald-1.0/timer.c 2007-03-21 13:11:44.000000000 -0600
|
||
|
@@ -35,7 +35,7 @@
|
||
|
unsigned long timestamp()
|
||
|
{
|
||
|
struct tms buf;
|
||
|
- return times(&buf)/CLK_TCK;
|
||
|
+ return times(&buf)/CLOCKS_PER_SEC;
|
||
|
}
|
||
|
|
||
|
unsigned long ticks()
|