olsrd_info.c: In function ‘write_data’:
olsrd_info.c:374:48: error: logical ‘or’ of equal expressions [-Werror=logical-op]
if ((result < 0) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) {
^~
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
outbuffer.written[i] += result;
}
+#if EWOULDBLOCK == EAGAIN
+ if ((result < 0) && (errno == EAGAIN)) {
+#else
if ((result < 0) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) {
+#endif
continue;
}
/* handle no data available */
if (bytes_received < 0) {
/* handle disconnect */
+#if EWOULDBLOCK == EAGAIN
+ if (errno != EAGAIN) { // oops - we got disconnected
+#else
if ((errno != EAGAIN) && (errno != EWOULDBLOCK)) { // oops - we got disconnected
+#endif
OLSR_PRINTF(1, "(QUAGGA) Disconnected from zebra\n");
zebra.status &= ~STATUS_CONNECTED;
/* TODO: Remove HNAs added from redistribution */