net.c: Fix building without TCP enabled for EPOLL configured code

Report when using autotools or cmake that disabling TCP also disables
Websockets support.

Also, report for cmake when EPOLL support is not available.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2023-05-16 12:01:59 +01:00
1 parent dbf78b526f
commit 1cb29b6f5c
3 files changed
+20 -3

No files matched your search

+2
View File
@@ -1987,11 +1987,13 @@ coap_io_do_epoll(coap_context_t *ctx, struct epoll_event *events, size_t nevents
coap_write_endpoint(endpoint->context, endpoint, now);
}
#if !COAP_DISABLE_TCP
if ((sock->flags & COAP_SOCKET_WANT_ACCEPT) &&
(events[j].events & EPOLLIN)) {
sock->flags |= COAP_SOCKET_CAN_ACCEPT;
coap_accept_endpoint(endpoint->context, endpoint, now);
}
#endif /* !COAP_DISABLE_TCP */
}
else