From 51baf4ab4d2dd8ca2b3e4ff8172a99f3d22ce62b Mon Sep 17 00:00:00 2001 From: Nick Banks Date: Thu, 1 Sep 2016 11:59:13 -0700 Subject: [PATCH] Add POLLIN to the poll flags for the posix example. (#505) --- examples/platforms/posix/radio.c | 2 +- examples/platforms/posix/uart.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/platforms/posix/radio.c b/examples/platforms/posix/radio.c index 16cb9c7a3..3c64ee090 100644 --- a/examples/platforms/posix/radio.c +++ b/examples/platforms/posix/radio.c @@ -531,7 +531,7 @@ void posixRadioUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd) void posixRadioProcess(void) { - const int flags = POLLRDNORM | POLLERR | POLLNVAL | POLLHUP; + const int flags = POLLIN | POLLRDNORM | POLLERR | POLLNVAL | POLLHUP; struct pollfd pollfd = { sSockFd, flags, 0 }; if (poll(&pollfd, 1, 0) > 0 && (pollfd.revents & flags) != 0) diff --git a/examples/platforms/posix/uart.c b/examples/platforms/posix/uart.c index 1eb4b22f9..162ce569e 100644 --- a/examples/platforms/posix/uart.c +++ b/examples/platforms/posix/uart.c @@ -188,7 +188,7 @@ void posixUartUpdateFdSet(fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd) void posixUartProcess(void) { - const int flags = POLLRDNORM | POLLERR | POLLNVAL | POLLHUP; + const int flags = POLLIN | POLLRDNORM | POLLERR | POLLNVAL | POLLHUP; struct pollfd pollfd = { s_in_fd, flags, 0 }; ssize_t rval;