diff -ur neon-0.25.4-orig/src/ne_openssl.c neon-0.25.4/src/ne_openssl.c
--- neon-0.25.4-orig/src/ne_openssl.c	2005-06-01 09:19:15.000000000 +0000
+++ neon-0.25.4/src/ne_openssl.c	2008-05-18 03:09:40.000000000 +0000
@@ -196,8 +196,12 @@
     
     bio = BIO_new(BIO_s_mem());
     if (bio) {
-	if (ASN1_TIME_print(bio, tm))
-	    BIO_read(bio, buf, NE_SSL_VDATELEN-1);
+	if (ASN1_TIME_print(bio, tm)) {
+	    int len = BIO_read(bio, buf, NE_SSL_VDATELEN-1);
+	    if (len >= 0)
+	    	buf[len] = '\0';
+	    
+	}
 	BIO_free(bio);
     }
 }
diff -ur neon-0.25.4-orig/src/ne_socket.c neon-0.25.4/src/ne_socket.c
--- neon-0.25.4-orig/src/ne_socket.c	2005-08-19 09:40:16.000000000 +0000
+++ neon-0.25.4/src/ne_socket.c	2008-05-18 03:09:40.000000000 +0000
@@ -136,7 +136,7 @@
 #include "ne_alloc.h"
 #include "ne_sspi.h"
 
-#if defined(__BEOS__) && !defined(BONE_VERSION)
+#if defined(__BEOS__) && !defined(BONE_VERSION) && !defined(__HAIKU__)
 /* pre-BONE */
 #define ne_close(s) closesocket(s)
 #define ne_errno errno
diff -ur neon-0.25.4-orig/test/common/child.c neon-0.25.4/test/common/child.c
--- neon-0.25.4-orig/test/common/child.c	2005-02-14 15:43:27.000000000 +0000
+++ neon-0.25.4/test/common/child.c	2008-05-18 03:09:40.000000000 +0000
@@ -230,11 +230,12 @@
 	char ch;
 	
 #ifdef USE_PIPE
+	close(fds[1]);
+
 	if (read(fds[0], &ch, 1) < 0)
 	    perror("parent read");
 
 	close(fds[0]);
-	close(fds[1]);
 #else
 	minisleep();
 #endif
diff -ur neon-0.25.4-orig/test/common/tests.c neon-0.25.4/test/common/tests.c
--- neon-0.25.4-orig/test/common/tests.c	2005-02-14 15:43:27.000000000 +0000
+++ neon-0.25.4/test/common/tests.c	2008-05-18 03:09:40.000000000 +0000
@@ -22,7 +22,7 @@
 
 #include <sys/types.h>
 
-#include <sys/signal.h>
+//#include <sys/signal.h>
 
 #include <stdio.h>
 #ifdef HAVE_SIGNAL_H
diff -ur neon-0.25.4-orig/test/run.sh neon-0.25.4/test/run.sh
--- neon-0.25.4-orig/test/run.sh	2004-10-17 18:18:20.000000000 +0000
+++ neon-0.25.4/test/run.sh	2008-05-18 03:09:40.000000000 +0000
@@ -2,8 +2,8 @@
 
 rm -f debug.log child.log
 
-ulimit -c unlimited
-ulimit -v 10240
+#ulimit -c unlimited
+#ulimit -v 10240
 
 # enable an safety-checking malloc in glibc which will abort() if
 # heap corruption is detected.
