]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: allow poll() array bigger than FD_SETSIZE
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:07:38 +0000 (22:07 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 7 Feb 2015 21:07:38 +0000 (22:07 +0100)
ChangeLog
hurd/hurdselect.c

index 0474b0f0355de4d598e2ce15dacfc92d3150b7ff..fa48858f524367388ed0c7273cc290d6bb6cc64e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@
        SF_ARCHIVED, SF_IMMUTABLE, SF_APPEND, SF_NOUNLINK, SF_SNAPSHOT):
        Declare macros.
        [__USE_MISC] (chflags, fchflags): Declare functions.
+       * hurd/hurdselect.c (_hurd_select): In the poll case, do not return
+       EINVAL when nfds is greater than FD_SETSIZE.
 
 2015-02-06  Roland McGrath  <roland@hack.frob.com>
 
index 279ee5ec19236fc16fded243c57fe5dc86021132..2996be2c8b7bf46efe4d184d483d36d5095d2c2f 100644 (file)
@@ -67,7 +67,7 @@ _hurd_select (int nfds,
   assert (sizeof (union typeword) == sizeof (mach_msg_type_t));
   assert (sizeof (uint32_t) == sizeof (mach_msg_type_t));
 
-  if (nfds < 0 || nfds > FD_SETSIZE)
+  if (nfds < 0 || (pollfds == NULL && nfds > FD_SETSIZE))
     {
       errno = EINVAL;
       return -1;