blob: d530619db9e26e3837b3ba03672c5e7f80778444 (
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
|
$NetBSD: patch-bf,v 1.2 2008/12/17 02:19:59 christos Exp $
--- murgil/serverserve.c.orig 1995-02-24 16:19:44.000000000 -0500
+++ murgil/serverserve.c 2008-12-16 20:18:00.000000000 -0500
@@ -15,11 +15,13 @@
#include "ipcf.h"
#include "externs.h"
-extern int errno;
fd_set fdr;
int timeisup;
sighandler gotalarm();
+#ifndef __FDS_BITS
+# define __FDS_BITS(set) ((set)->fds_bits)
+#endif
serverserve()
{
@@ -81,9 +83,9 @@
/* examine set of file descriptors */
for (b = 0, y = 0; b <= (howmany(highestfd, 32) - 1); b++, y += 32) {
- if (!fdr.fds_bits[b])
+ if (!__FDS_BITS(&fdr)[b])
continue;
- bits = fdr.fds_bits[b];
+ bits = __FDS_BITS(&fdr)[b];
for (x = y; bits; x++, bits >>= 01)
if (bits & 01)
if (x == port_fd) {
|