--- curl-7.18.1/lib/select.c	2008-03-08 22:11:11.000000000 +0000
+++ curl-7.18.1.patched/lib/select.c	2008-04-19 15:28:49.000000000 +0000
@@ -35,9 +35,13 @@
 #endif
 
 #ifdef __BEOS__
+#ifdef __HAIKU__
+#include <sys/socket.h>
+#else
 /* BeOS has FD_SET defined in socket.h */
 #include <socket.h>
 #endif
+#endif
 
 #ifdef MSDOS
 #include <dos.h>  /* delay() */
