--- /dev/null
+--- configure.in.org 2008-10-19 15:34:15.802087380 +0200
++++ configure.in 2008-10-19 15:34:53.712083280 +0200
+@@ -226,30 +226,9 @@
+ #
+ CPG_LDFLAGS=
+ if test "x$cpg_found" = "xyes"; then
+- # Remember, AIS_TRY_PATH starts with a colon ':' on purpose
+- AIS_TRY_PATH=":/usr/lib64:/usr/lib:/usr/local/lib64:/usr/local/lib"
+- AC_MSG_CHECKING([for cpg_initialize in -lcpg])
+- while test "x$AIS_TRY_PATH" != "x"; do
+- TRY="`echo $AIS_TRY_PATH | cut -f1 -d:`"
+- AIS_TRY_PATH="`echo $AIS_TRY_PATH | cut -f2- -d:`"
+-
+- if test "x$TRY" != "x"; then
+- TRY="-L${TRY}/openais"
+- fi
+- TRY="$TRY"
+-
+- saved_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS $TRY -lcpg"
+- AC_LINK_IFELSE([AC_LANG_CALL([], [cpg_initialize])],
+- [CPG_LDFLAGS="$TRY"])
+- LDFLAGS="$saved_LDFLAGS"
+-
+- if test "x$CPG_LDFLAGS" != "x"; then
+- break
+- fi
+- done
++ AC_CHECK_LIB(cpg, cpg_initialize, [], [cpg_found=no])
+ fi
+-if test "x$CPG_LDFLAGS" != "x"; then
++if test "x$cpg_found" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
--- /dev/null
+--- libo2cb/client_proto.c.org 2008-10-19 15:37:40.518733830 +0200
++++ libo2cb/client_proto.c 2008-10-19 15:37:53.005866078 +0200
+@@ -13,6 +13,7 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>