Okay this is scary but it is just adding a configure option to disable

* HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
  encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
  testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
  testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
  xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
  example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
  include/libxml/catalog.h include/libxml/debugXML.h
  include/libxml/entities.h include/libxml/nanohttp.h
  include/libxml/relaxng.h include/libxml/tree.h
  include/libxml/valid.h include/libxml/xmlIO.h
  include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
  include/libxml/xpathInternals.h python/libxml.c:
  Okay this is scary but it is just adding a configure option
  to disable output, this touches most of the files.
Daniel
diff --git a/nanohttp.c b/nanohttp.c
index 15cc94d..5072d37 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -95,7 +95,9 @@
  * A couple portability macros
  */
 #ifndef _WINSOCKAPI_
+#ifndef __BEOS__
 #define closesocket(s) close(s)
+#endif
 #define SOCKET int
 #endif
 
@@ -922,6 +924,7 @@
     if ( FD_ISSET(s, &wfd) ) {
 	SOCKLEN_T len;
 	len = sizeof(status);
+#ifdef SO_ERROR
 	if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char*)&status, &len) < 0 ) {
 	    /* Solaris error code */
 	    xmlGenericError( xmlGenericErrorContext,
@@ -930,6 +933,7 @@
 				strerror( socket_errno( ) ) );
 	    return (-1);
 	}
+#endif
 	if ( status ) {
 	    closesocket(s);
 	    errno = status;
@@ -1510,6 +1514,7 @@
     return(0);
 }
 
+#ifdef LIBXML_OUTPUT_ENABLED
 /**
  * xmlNanoHTTPSave:
  * @ctxt:  the HTTP context
@@ -1546,6 +1551,7 @@
     xmlNanoHTTPClose(ctxt);
     return(0);
 }
+#endif /* LIBXML_OUTPUT_ENABLED */
 
 /**
  * xmlNanoHTTPReturnCode: