#include "diseqc.h"
#include "atomic.h"
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
#include <sys/epoll.h>
#elif ENABLE_KQUEUE
#include <sys/event.h>
int fd = -1, i, r, c, nfds, dmx = -1;
uint8_t tsb[188 * 10];
service_t *t;
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
int delay = 10;
int efd;
struct epoll_event ev;
return NULL;
}
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
/* Create poll */
efd = epoll_create(2);
memset(&ev, 0, sizeof(ev));
while(1) {
/* Wait for input */
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
nfds = epoll_wait(efd, &ev, 1, delay);
/* No data */
if(dmx != -1)
close(dmx);
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
close(efd);
#elif ENABLE_KQUEUE
close(kfd);
#include <string.h>
#include <assert.h>
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
#include <sys/epoll.h>
#elif ENABLE_KQUEUE
#include <sys/event.h>
timeshift_index_iframe_t *tsi = NULL;
streaming_skip_t *skip = NULL;
time_t last_status = 0;
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
int efd;
struct epoll_event ev = { 0 };
#elif ENABLE_KQUEUE
struct kevent ke;
#endif
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
/* Poll */
efd = epoll_create(1);
ev.events = EPOLLIN;
/* Wait for data */
if(wait)
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
nfds = epoll_wait(efd, &ev, 1, wait);
#elif ENABLE_KQUEUE
nfds = kevent(kfd, NULL, 0, &ke, 1, NULL);
}
/* Cleanup */
-#ifdef ENABLE_EPOLL
+#if ENABLE_EPOLL
close(efd);
#elif ENABLE_KQUEUE
close(kfd);