summaryrefslogtreecommitdiff
path: root/net-dialup/diald/files/diald-1.0-posix.patch
blob: 3ff13ab9bdbcd66e943f412ac970f302d4e4e26e (plain)
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
37
38
39
40
41
42
diff -Nru diald-1.0.orig/diald.h diald-1.0/diald.h
--- diald-1.0.orig/diald.h	2001-06-16 19:01:25.000000000 +0300
+++ diald-1.0/diald.h	2006-09-21 15:58:57.000000000 +0300
@@ -31,6 +31,10 @@
 #if HAVE_SYS_TIME_H
 #  include <sys/time.h>
 #endif
+#include <time.h>
+#ifndef CLK_TCK
+#	define CLK_TCK	(CLOCKS_PER_SEC)
+#endif
 #ifdef _POSIX_PRIORITY_SCHEDULING
 #  include <sched.h>
 #endif
diff -Nru diald-1.0.orig/firewall.c diald-1.0/firewall.c
--- diald-1.0.orig/firewall.c	2006-09-21 16:08:18.000000000 +0300
+++ diald-1.0/firewall.c	2006-09-21 15:49:12.000000000 +0300
@@ -69,7 +69,7 @@
 #if 0
     mon_syslog(LOG_DEBUG,"slot def: %d %d %x %x %x",
 	slot->start, slot->end, slot->wday, slot->mday, slot->month);
-#endif 0
+#endif
 	if ((slot->start <= ctime)
 	&&  (ctime <= slot->end)
 	&&  (slot->wday & (1<<ltime->tm_wday))
diff -Nru diald-1.0.orig/log.c diald-1.0/log.c
--- diald-1.0.orig/log.c	2001-06-16 22:51:39.000000000 +0300
+++ diald-1.0/log.c	2006-09-21 16:05:11.000000000 +0300
@@ -19,10 +19,8 @@
 xstrerror(int n)
 {
     static char	buf[30];
-
-    if (n >= 0 && n < sys_nerr)
-	return (char *)sys_errlist[n];
-    sprintf(buf, "Error code %d\n", n);
+    if (strerror_r(n, buf, 30) != 0)
+        sprintf(buf, "Error code %d\n", n);
     return buf;
 }