]> granicus.if.org Git - libevent/commitdiff
make it work on freebsd; from phil oleson
authorNiels Provos <provos@gmail.com>
Sat, 27 Jan 2007 04:10:08 +0000 (04:10 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 27 Jan 2007 04:10:08 +0000 (04:10 +0000)
svn:r314

buffer.c
http.c

index fe6c30ef4e7b928f065af95e6357ed98ab930330..fe384753e724ebb3f1fc86423179666bb3164cde 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -138,6 +138,9 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
                buffer = (char *)buf->buffer + buf->off;
                space = buf->totallen - buf->misalign - buf->off;
 
+#ifndef va_copy
+#define        va_copy(dst, src)       memcpy(&(dst), &(src), sizeof(va_list))
+#endif
                va_copy(aq, ap);
 
 #ifdef WIN32
diff --git a/http.c b/http.c
index fdb5e628c0786eee151dc69d76ca5ad32e2c3057..0e29ec65d119ae4efa24aec432a90c35c08819e3 100644 (file)
--- a/http.c
+++ b/http.c
@@ -538,10 +538,11 @@ evhttp_connection_done(struct evhttp_connection *evcon)
         * on the connection, so that we can reply to it.
         */
        if (evcon->flags & EVHTTP_CON_OUTGOING) {
+               int need_close;
                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);