pkgsrc/chat/icb/patches/patch-bf
christos 460bd4190f make this work on 64 bit platforms:
- fix warnings for missing prototypes
- use termios instead of sgtty (why doesn't this work on amd64?)
2008-12-17 02:19:59 +00:00

31 lines
770 B
Text

$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) {