lib: Added some missing headers to mtio-epoll.
[ashd.git] / lib / mtio-epoll.c
index 940ba3d..511af81 100644 (file)
@@ -17,6 +17,9 @@
 */
 
 #include <stdlib.h>
+#include <unistd.h>
+#include <time.h>
+#include <fcntl.h>
 #include <string.h>
 #include <sys/epoll.h>
 #include <errno.h>
@@ -163,6 +166,7 @@ void ioloop(void)
     time_t now, timeout;
     
     epfd = epoll_create(128);
+    fcntl(epfd, F_SETFD, FD_CLOEXEC);
     for(bl = blockers; bl; bl = nbl) {
        nbl = bl->n;
        if(regfd(bl))