1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

rtos: dont declare pollfd if POLLIN already defined

This commit is contained in:
Andy Green 2019-06-20 07:36:53 +01:00
parent a72b422be3
commit 65afc126a8

View file

@ -24,6 +24,16 @@
typedef int lws_sockfd_type;
typedef int lws_filefd_type;
/*
* Later lwip (at least 2.1.12) already defines these in its own headers
* protected by the same test as used here... if POLLIN / POLLOUT already exist
* then assume no need to declare those and struct pollfd.
*
* Older lwip needs these declarations done here.
*/
#if !defined(POLLIN) && !defined(POLLOUT)
struct pollfd {
lws_sockfd_type fd; /**< fd related to */
short events; /**< which POLL... events to respond to */
@ -36,6 +46,8 @@ struct pollfd {
#define POLLHUP 0x0010
#define POLLNVAL 0x0020
#endif
#if defined(LWS_AMAZON_RTOS)
#include <FreeRTOS.h>
#include <event_groups.h>