diff -Naur libmms-0.5/configure.in libmms-0.5-haiku/configure.in
--- libmms-0.5/configure.in	2009-11-03 07:21:23.038273024 -0200
+++ libmms-0.5-haiku/configure.in	2010-06-19 01:51:54.807141376 -0300
@@ -3,6 +3,8 @@
 AM_CONFIG_HEADER([config.h src/mms_config.h])
 AC_CONFIG_SRCDIR(configure.in)
 
+AC_CHECK_HEADERS(sys/select.h)
+
 AC_ISC_POSIX
 AC_PROG_CC
 AC_STDC_HEADERS
diff -Naur libmms-0.5/src/mms.c libmms-0.5-haiku/src/mms.c
--- libmms-0.5/src/mms.c	2009-11-03 07:18:02.033816576 -0200
+++ libmms-0.5-haiku/src/mms.c	2010-06-19 01:51:10.941621248 -0300
@@ -32,6 +32,10 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/socket.h>
diff -Naur libmms-0.5/src/mmsh.c libmms-0.5-haiku/src/mmsh.c
--- libmms-0.5/src/mmsh.c	2009-11-03 07:18:02.034078720 -0200
+++ libmms-0.5-haiku/src/mmsh.c	2010-06-19 01:45:17.941621248 -0300
@@ -34,6 +34,10 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
