this one works much better. if icb -h segfaults for you on amd64 please test it.
Index: Makefile =================================================================== RCS file: /cvs/ports/net/icb/Makefile,v retrieving revision 1.25 diff -u -r1.25 Makefile --- Makefile 15 Sep 2007 22:36:53 -0000 1.25 +++ Makefile 14 Dec 2009 21:09:36 -0000 @@ -4,7 +4,7 @@ COMMENT= Internet CB - mostly-defunct chat client DISTNAME= icb-5.0.9 -PKGNAME= ${DISTNAME}p3 +PKGNAME= ${DISTNAME}p4 CATEGORIES= net MASTER_SITES= ftp://ftp.swcp.com/pub/icb/clients/unix/ Index: patches/patch-glob_tilde_c =================================================================== RCS file: /cvs/ports/net/icb/patches/patch-glob_tilde_c,v retrieving revision 1.1 diff -u -r1.1 patch-glob_tilde_c --- patches/patch-glob_tilde_c 31 Dec 2005 02:09:46 -0000 1.1 +++ patches/patch-glob_tilde_c 17 Dec 2009 00:20:57 -0000 @@ -9,3 +9,12 @@ #ifndef savestring #define savestring(x) (char *)strcpy ((char *)xmalloc (1 + strlen (x)), (x)) +@@ -41,7 +42,7 @@ typedef int Function (); + #if defined (TEST) + static char *xmalloc (), *xrealloc (); + #else +-extern char *malloc (), *xrealloc (); ++extern char *malloc (), *xrealloc (), *xmalloc(); + #endif /* TEST */ + + /* The default value of tilde_additional_prefixes. This is set to Index: patches/patch-icb_getswitch_c =================================================================== RCS file: patches/patch-icb_getswitch_c diff -N patches/patch-icb_getswitch_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-icb_getswitch_c 17 Dec 2009 00:29:25 -0000 @@ -0,0 +1,9 @@ +$OpenBSD$ +--- icb/getswitch.c.orig Thu Dec 17 01:27:28 2009 ++++ icb/getswitch.c Thu Dec 17 01:27:34 2009 +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + #include <strings.h> + #include <string.h> + Index: patches/patch-icb_icb_h =================================================================== RCS file: /cvs/ports/net/icb/patches/patch-icb_icb_h,v retrieving revision 1.1 diff -u -r1.1 patch-icb_icb_h --- patches/patch-icb_icb_h 14 May 2001 16:42:53 -0000 1.1 +++ patches/patch-icb_icb_h 17 Dec 2009 00:20:57 -0000 @@ -1,7 +1,22 @@ $OpenBSD: patch-icb_icb_h,v 1.1 2001/05/14 16:42:53 millert Exp $ ---- icb/icb.h.orig Fri Feb 24 14:20:23 1995 -+++ icb/icb.h Mon May 14 10:33:06 2001 -@@ -38,6 +38,7 @@ typedef struct { +--- icb/icb.h.orig Fri Feb 24 22:20:23 1995 ++++ icb/icb.h Thu Dec 17 01:02:59 2009 +@@ -4,13 +4,12 @@ + #include "../protocol.h" + #include "../tcl/tcl.h" + #include <stdio.h> ++#include <stdlib.h> + #include <sys/param.h> + #ifdef NEED_CTYPE + #include <ctype.h> + #endif + +-char *malloc(); +- + /* command usage information */ + + typedef struct Usage { +@@ -38,6 +37,7 @@ typedef struct { int beeps; /* whether beeps are audible */ char *editmode; /* input editing mode */ int tabreply; /* should replies go into the tab history? */ Index: patches/patch-malloc_xmalloc_c =================================================================== RCS file: patches/patch-malloc_xmalloc_c diff -N patches/patch-malloc_xmalloc_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-malloc_xmalloc_c 17 Dec 2009 00:20:57 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- malloc/xmalloc.c.orig Thu Dec 17 00:54:12 2009 ++++ malloc/xmalloc.c Thu Dec 17 00:54:21 2009 +@@ -20,6 +20,7 @@ + Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include <stdio.h> ++#include <stdlib.h> + + static void memory_error_and_abort (); + Index: patches/patch-readline_readline_h =================================================================== RCS file: patches/patch-readline_readline_h diff -N patches/patch-readline_readline_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-readline_readline_h 17 Dec 2009 00:20:56 -0000 @@ -0,0 +1,11 @@ +$OpenBSD$ +--- readline/readline.h.orig Thu Dec 17 00:51:19 2009 ++++ readline/readline.h Thu Dec 17 00:51:26 2009 +@@ -5,6 +5,7 @@ + + #include <readline/keymaps.h> + #include <stdio.h> ++#include <stdlib.h> + + #if !defined (__FUNCTION_DEF) + typedef int Function ();