summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Lledó <joanlluislledo@gmail.com>2018-08-11 18:17:07 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-08-14 00:31:19 +0200
commitf511dce3f6598b75505a553ee40036bdb8167042 (patch)
treee8f397bff99e87dd13cd537db7b66eb58157f710
parent06429d67b7e9be332d1012ed4c2bba694e5ddabb (diff)
lwip: poll(): return EIO when POLLERR is set
Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): If POLLERR is set, return EIO.
-rw-r--r--lwip/io-ops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lwip/io-ops.c b/lwip/io-ops.c
index 636c26f7..1429bc55 100644
--- a/lwip/io-ops.c
+++ b/lwip/io-ops.c
@@ -229,6 +229,9 @@ lwip_io_select_common (struct sock_user *user,
if (ret > 0)
{
+ if (fdp.revents & POLLERR)
+ return EIO;
+
if (fdp.revents & POLLIN)
*select_type |= SELECT_READ;