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:
parent
a72b422be3
commit
65afc126a8
1 changed files with 12 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue