--- iothread.cpp.orig
+++ iothread.cpp
@@ -11,6 +11,7 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <queue>
+#include <sys/select.h>
 
 #ifdef _POSIX_THREAD_THREADS_MAX
 #if _POSIX_THREAD_THREADS_MAX < 64
