From: Todd C. Miller Date: Fri, 31 Mar 1995 22:27:35 +0000 (+0000) Subject: added FD_SET and FD_ZERO for 4.2BSD X-Git-Tag: SUDO_1_4_0~507 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d11b8fd1c78237bd490573fdfa185f27e64dfe2;p=sudo added FD_SET and FD_ZERO for 4.2BSD --- diff --git a/compat.h b/compat.h index 554700550..1f755d7e5 100644 --- a/compat.h +++ b/compat.h @@ -48,6 +48,14 @@ # define MAXHOSTNAMELEN 64 #endif +/* + * 4.2BSD lacks FD_* macros (we only use FD_SET and FD_ZERO) + */ +#ifndef FD_SETSIZE +#define FD_SET(fd, fds) ((fds) -> fds_bits[0] |= (1 << (fd))) +#define FD_ZERO(fds) ((fds) -> fds_bits[0] = 0) +#endif /* !FD_SETSIZE */ + /* * Posix versions for those without... */