mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
Enable epoll on linux
This commit is contained in:
1 parent
4702073458
commit
51cb40acd2
8 files changed
+148
-6
No files matched your search
+8
-2
@@ -8,7 +8,9 @@
|
||||
#include <mach/mach_time.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MG_ENABLE_POLL) && (defined(__linux__) || defined(__APPLE__))
|
||||
#if !defined(MG_ENABLE_EPOLL) && defined(__linux__)
|
||||
#define MG_ENABLE_EPOLL 1
|
||||
#elif !defined(MG_ENABLE_POLL)
|
||||
#define MG_ENABLE_POLL 1
|
||||
#endif
|
||||
|
||||
@@ -30,11 +32,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(MG_ENABLE_POLL) && MG_ENABLE_POLL
|
||||
|
||||
#if defined(MG_ENABLE_EPOLL) && MG_ENABLE_EPOLL
|
||||
#include <sys/epoll.h>
|
||||
#elif 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>
|
||||
|
||||
Reference in new issue
Block a user