Merge pull request #1561 from vkoskiv/add-poll

Add optional poll() implementation under MG_ENABLE_POLL define
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2022-05-26 07:53:02 +01:00
commit 252e4715d4
5 files changed
+84 -2

No files matched your search

+8
View File
@@ -436,7 +436,11 @@ extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(MG_ENABLE_POLL) && MG_ENABLE_POLL
#include <poll.h>
#else
#include <sys/select.h>
#endif
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -578,6 +582,10 @@ int sscanf(const char *, const char *, ...);
#define MG_ENABLE_MIP 0
#endif
#ifndef MG_ENABLE_POLL
#define MG_ENABLE_POLL 0
#endif
#ifndef MG_ENABLE_FATFS
#define MG_ENABLE_FATFS 0
#endif