Added select() backend which can be used as a fallback if epoll is not available.

This commit is contained in:
Jan Vidar Krey
2010-01-20 17:26:23 +01:00
parent 7e60919596
commit 2f09fcea84
16 changed files with 344 additions and 608 deletions

View File

@@ -102,13 +102,12 @@
#define uhub_assert assert
#ifdef USE_LIBEVENT
#include <event.h>
#else
#ifdef __linux__
#define USE_EPOLL
#include <sys/epoll.h>
#endif
#else
#define USE_SELECT
#include <sys/select.h>
#endif
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__sun__)