summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-25 20:05:54 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-26 15:32:15 +0100
commit3b0e76ec9c9386e428944f621b970d691884b84a (patch)
treec8cba9dfe64816236c1a48035294143336c6f3cd
parent96f66f82cfcd3f21f73542375f9c722ac907c076 (diff)
drop explicit check for EWOULDBLOCK if it has the same value as EAGAIN
gcc correctly reports that we check for the same value twice, expect that the manpage of read(2) tells us to do it for portability, so to make both sides happy lets add a little #if'ing here. Reported-By: gcc-6 Git-Dch: Ignore
-rw-r--r--apt-pkg/contrib/strutl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 856e5ee9f..5e641a02b 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -788,7 +788,11 @@ bool ReadMessages(int Fd, vector<string> &List)
return false;
// No data
+#if EAGAIN != EWOULDBLOCK
if (Res < 0 && (errno == EAGAIN || errno == EWOULDBLOCK))
+#else
+ if (Res < 0 && errno == EAGAIN)
+#endif
return true;
if (Res < 0)
return false;