Skip to content

Commit

Permalink
fix lwip poll macro conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
zmshahaha committed Sep 13, 2024
1 parent d2160d3 commit 9130853
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/net/lwip/lwip-2.1.2/src/include/lwip/sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,18 @@ typedef struct fd_set
/* poll-related defines and types */
/* @todo: find a better way to guard the definition of these defines and types if already defined */
#if !defined(POLLIN) && !defined(POLLOUT)
#ifdef RT_USING_MUSLLIBC
#define POLLIN 0x001 /**< There is data to read. */
#define POLLPRI 0x002 /**< There is urgent data to read. */
#define POLLOUT 0x004 /**< Writing is now possible. */
#define POLLERR 0x008 /**< Error condition. */
#define POLLHUP 0x010 /**< Hang up. */
#define POLLNVAL 0x020 /**< Invalid polling request. */
#define POLLRDNORM 0x040 /**< Normal data may be read. */
#define POLLRDBAND 0x080 /**< Priority data may be read. */
#define POLLWRNORM 0x100 /**< Writing normal data is possible. */
#define POLLWRBAND 0x200 /**< Writing priority data is possible. */
#else
#define POLLIN 0x1
#define POLLOUT 0x2
#define POLLERR 0x4
Expand All @@ -506,6 +518,7 @@ typedef struct fd_set
#define POLLWRNORM 0x80
#define POLLWRBAND 0x100
#define POLLHUP 0x200
#endif /* RT_USING_MUSLLIBC */
typedef unsigned int nfds_t;
struct pollfd
{
Expand Down

0 comments on commit 9130853

Please sign in to comment.