From fddbf1f94ca57c66d5b2ba0f67d55e13357b967f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 3 Apr 2010 21:22:32 +0200 Subject: Added a select(2) based poll-emulation if poll(2) is not available. --- include/libssh/poll.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/libssh') diff --git a/include/libssh/poll.h b/include/libssh/poll.h index 54a1348b..ab00139f 100644 --- a/include/libssh/poll.h +++ b/include/libssh/poll.h @@ -40,7 +40,7 @@ typedef struct ssh_pollfd_struct { /* poll.c */ #ifndef POLLIN -# define POLLIN 0x001 /* There is data to read. */ +#define POLLIN 0x001 /* There is data to read. */ #endif #ifndef POLLPRI #define POLLPRI 0x002 /* There is urgent data to read. */ @@ -59,6 +59,20 @@ typedef struct ssh_pollfd_struct { #define POLLNVAL 0x020 /* Invalid polling request. */ #endif +#ifndef POLLRDNORM +#define POLLRDNORM 0x040 /* mapped to read fds_set */ +#endif +#ifndef POLLRDBAND +#define POLLRDBAND 0x080 /* mapped to exception fds_set */ +#endif +#ifndef POLLWRNORM +#define POLLWRNORM 0x100 /* mapped to write fds_set */ +#endif +#ifndef POLLWRBAND +#define POLLWRBAND 0x200 /* mapped to write fds_set */ +#endif + + typedef unsigned long int nfds_t; #endif /* HAVE_POLL */ -- cgit