summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authorbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-08-03 00:10:57 +0000
committerbrianp <brianp@13f79535-47bb-0310-9956-ffa450edef68>2002-08-03 00:10:57 +0000
commit973aba6127f4310a2a04bfc9989cd1025177f54b (patch)
tree5b9dde8aa37bb38818b1d38daaedd52ad6112c13 /poll
parentff0b688ec3768c80e9b9b538d955a862c228ab39 (diff)
downloadlibapr-973aba6127f4310a2a04bfc9989cd1025177f54b.tar.gz
On systems without poll, limit apr_pollset's capacity to
the number of descriptors that select can handle (this is why testpoll test #4 was failing on win32) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63779 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/poll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 58c520147..969726ddd 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -325,6 +325,12 @@ APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset,
apr_uint32_t size,
apr_pool_t *p)
{
+#if !defined(HAVE_POLL) && defined(FD_SETSIZE)
+ if (size > FD_SETSIZE) {
+ *pollset = NULL;
+ return APR_EINVAL;
+ }
+#endif
*pollset = apr_palloc(p, sizeof(**pollset));
(*pollset)->nelts = 0;
(*pollset)->nalloc = size;