summaryrefslogtreecommitdiff
path: root/chat/i2cbd/patches/patch-ai
blob: c45e27da03a8f2651aab765358620bca61495fb8 (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
43
44
45
46
47
48
49
50
51
$NetBSD: patch-ai,v 1.1 2006/05/10 20:31:50 christos Exp $

--- src/serverserve.c.orig	2001-10-26 19:07:19.000000000 -0400
+++ src/serverserve.c	2006-05-10 16:28:22.000000000 -0400
@@ -19,7 +19,9 @@
 fd_set held_fdset;
 
 void	serverserve (void);
+#ifdef USE_ALARM
 static void	gotalarm (int);
+#endif
 static void	sdoinput (void);
 
 void
@@ -35,10 +37,13 @@
 		for (i = 0; i < MAX_USERS+1; i++)
 			cbufs[i].new = 1;
 
+#ifdef USE_ALARM
 	signal(SIGALRM, gotalarm);
+#endif
 	timeisup = 0;
 
 	for (;;) {
+#ifdef USE_ALARM
 		if (polldelay) {
 			if (setitimer(ITIMER_REAL, polldelay, 0) < 0) {
 				perror("server: setitimer failed");
@@ -46,6 +51,7 @@
 			}
 			timeisup = 0;
 		}
+#endif
 
 		memmove(&fdr, &fdset, sizeof(fdset));
 		memmove(&efdr, &fdset, sizeof(fdset));
@@ -85,12 +91,14 @@
 	}
 }
 
+#ifdef USE_ALARM
 static void
 gotalarm(int n)
 {
 	timeisup++;
 	signal(n, gotalarm);
 }
+#endif
 
 static void
 sdoinput(void)