Changeset 7ec4d87 in rtems-libbsd


Ignore:
Timestamp:
Oct 20, 2017, 12:50:14 PM (21 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
fd34b52
Parents:
9a583a9
git-author:
Sebastian Huber <sebastian.huber@…> (10/20/17 12:50:14)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/20/17 12:59:54)
Message:

dhcpcd: Honour file descriptor maximum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dhcpcd/compat/pselect.c

    r9a583a9 r7ec4d87  
    3636
    3737#include "pollts.h"
     38#ifdef __rtems__
     39#include <string.h>
     40#include <rtems/libio_.h>
     41#endif /* __rtems__ */
    3842
    3943int
     
    4145    const struct timespec *restrict ts, const sigset_t *restrict sigmask)
    4246{
     47#ifndef __rtems__
    4348        fd_set read_fds;
     49#else /* __rtems__ */
     50        fd_set big_enough_read_fs[howmany(rtems_libio_number_iops,
     51            sizeof(fd_set) * 8)];
     52#define read_fds (*(fd_set *)(&big_enough_read_fs[0]))
     53#endif /* __rtems__ */
    4454        nfds_t n;
    4555        int maxfd, r;
     
    4757        struct timeval *tvp;
    4858
     59#ifndef __rtems__
    4960        FD_ZERO(&read_fds);
     61#else /* __rtems__ */
     62        memset(big_enough_read_fs, 0, sizeof(big_enough_read_fs));
     63#endif /* __rtems__ */
    5064        maxfd = 0;
    5165        for (n = 0; n < nfds; n++) {
Note: See TracChangeset for help on using the changeset viewer.