Changeset e6d558f in rtems-libbsd


Ignore:
Timestamp:
Dec 17, 2013, 1:10:37 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 647dd08ae2aa69b935c2847ea450fb824322ecae, freebsd-9.3, c6261f97870562d4c797cfb1ff1ba0affb85a916
Children:
61d281e
Parents:
917a78b
git-author:
Sebastian Huber <sebastian.huber@…> (12/17/13 13:10:37)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/30/14 15:23:03)
Message:

DHCPCD(8): Use select() instead of pselect()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dhcpcd/compat/pselect.c

    r917a78b re6d558f  
    2828#include <sys/time.h>
    2929#include <sys/types.h>
     30#include <sys/select.h>
    3031
    3132#include <limits.h>
     
    4344        nfds_t n;
    4445        int maxfd, r;
     46        struct timeval tv;
     47        struct timeval *tvp;
    4548
    4649        FD_ZERO(&read_fds);
     
    5457        }
    5558
    56         r = pselect(maxfd + 1, &read_fds, NULL, NULL, ts, sigmask);
     59        if (ts != NULL) {
     60                TIMESPEC_TO_TIMEVAL(&tv, ts);
     61                tvp = &tv;
     62        } else {
     63                tvp = NULL;
     64        }
     65
     66        r = select(maxfd + 1, &read_fds, NULL, NULL, tvp);
    5767        if (r > 0) {
    5868                for (n = 0; n < nfds; n++) {
Note: See TracChangeset for help on using the changeset viewer.