+diff -urN cvs-1.12.13/configure cvs-1.12.13-haiku/configure
+--- cvs-1.12.13/configure	2005-10-03 13:36:42.000000000 +0000
++++ cvs-1.12.13-haiku/configure	2008-09-29 13:33:37.000000000 +0000
+@@ -37138,7 +37138,7 @@
+ rm -f conftest.err conftest.$ac_objext \
+       conftest$ac_exeext conftest.$ac_ext
+ if test "$ac_cv_search_connect" = no; then
+-  for ac_lib in xnet socket inet; do
++  for ac_lib in xnet socket network inet; do
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+     cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+diff -urN cvs-1.12.13/configure.in cvs-1.12.13-haiku/configure.in
+--- cvs-1.12.13/configure.in	2005-10-03 13:34:45.000000000 +0000
++++ cvs-1.12.13-haiku/configure.in	2008-09-29 13:32:01.000000000 +0000
+@@ -515,7 +515,7 @@
+ 
+ # Try to find connect and gethostbyname.
+ AC_CHECK_LIB(nsl, main)
+-AC_SEARCH_LIBS(connect, xnet socket inet,
++AC_SEARCH_LIBS(connect, xnet socket network inet,
+   AC_DEFINE(HAVE_CONNECT, 1,
+ [Define if you have the connect function.]))
+ dnl no need to search nsl for gethostbyname here since we should have
 diff -urN cvs-1.12.13/lib/getpass.c cvs-1.12.13-haiku/lib/getpass.c
 --- cvs-1.12.13/lib/getpass.c	2005-09-19 21:12:21.000000000 +0000
 +++ cvs-1.12.13-haiku/lib/getpass.c	2008-09-29 12:14:49.000000000 +0000

     }
diff -urN cvs-1.12.13/lib/stdbool_.h cvs-1.12.13-haiku/lib/stdbool_.h
--- cvs-1.12.13/lib/stdbool_.h	2005-05-23 17:44:32.000000000 +0000
+++ cvs-1.12.13-haiku/lib/stdbool_.h	2008-09-29 12:03:52.000000000 +0000
@@ -55,7 +55,7 @@
 
 /* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
    definitions below, but temporarily we have to #undef them.  */
-#ifdef __BEOS__
+#if defined (__BEOS__) && !defined (__HAIKU__)
 # include <OS.h> /* defines bool but not _Bool */
 # undef false
 # undef true

    (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
    enum; this ensures that '_Bool' promotes to 'int'.  */
-#if !(defined __cplusplus || defined __BEOS__)
+#if defined __cplusplus || defined __BEOS__ && !defined__HAIKU__
 # if !@HAVE__BOOL@
 #  if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
     /* Avoid stupid "warning: _Bool is a keyword in ISO C99".  */
