[Libevent-users] two more patches (from the FreeBSD port)

Phil Oleson oz at nixil.net
Fri Jan 26 01:46:42 EST 2007


I found these two patches in the freebsd port.  They are for
compatibility with older compilers. I've upgraded my home system so I'm
not noticing these issues.

	-Phil.
-------------- next part --------------
#
# Define va_copy if not exists. 4.x for exemple.
#
--- buffer.c.orig	Mon Dec  4 11:34:31 2006
+++ buffer.c	Mon Dec  4 11:35:44 2006
@@ -138,6 +138,9 @@
 		buffer = (char *)buf->buffer + buf->off;
 		space = buf->totallen - buf->misalign - buf->off;
 
+#ifndef va_copy
+#define	va_copy(dest,src)	memcpy(&dest, &src, sizeof (va_list))
+#endif
 		va_copy(aq, ap);
 
 #ifdef WIN32
-------------- next part --------------
#
# Fix build with old gcc
#
--- http.c.orig	Sat Dec  2 19:30:04 2006
+++ http.c	Mon Dec  4 11:17:38 2006
@@ -518,6 +518,7 @@
 evhttp_connection_done(struct evhttp_connection *evcon)
 {
 	struct evhttp_request *req = TAILQ_FIRST(&evcon->requests);
+	int need_close;
 
 	/*
 	 * if this is an incoming connection, we need to leave the request
@@ -527,7 +528,7 @@
 		TAILQ_REMOVE(&evcon->requests, req, next);
 		req->evcon = NULL;
 
-		int need_close = 
+		need_close = 
 		    evhttp_is_connection_close(req->input_headers) ||
 		    evhttp_is_connection_close(req->output_headers);
 


More information about the Libevent-users mailing list