<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>[PATCH] TAILQ_ENTRY missing in evhttp.h on linux</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>In using the latest 1.3e on linux, evhttp.h fails to compile because of a missing definition of TAILQ_ENTRY in evhttp.h.&nbsp; This is due to the fact that the workaround in event.h is #define'd and #undef'd within event.h and not available to evhttp.h when defining &quot;struct evhttp_request&quot;.&nbsp; This patch obviously fixes it:<BR>
<BR>
--- libevent-1.3e/evhttp.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-08-25 13:49:22.000000000 -0500<BR>
+++ libevent-1.3e.002/evhttp.h&nbsp; 2007-10-29 22:32:07.000000000 -0500<BR>
@@ -108,7 +108,14 @@<BR>
&nbsp; * reasonable accessors.<BR>
&nbsp; */<BR>
&nbsp;struct evhttp_request {<BR>
+#if defined(TAILQ_ENTRY)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TAILQ_ENTRY(evhttp_request) next;<BR>
+#else<BR>
+struct {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct type *tqe_next;&nbsp; /* next element */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct type **tqe_prev; /* address of previous next element */&nbsp; \<BR>
+}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next;<BR>
+#endif<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* the connection object that this request belongs to */<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct evhttp_connection *evcon;<BR>
<BR>
... but it would be nice if this was coordinated with the definition in event.h, possibly by simply not #undef'ing it from event.h.&nbsp; Anyway, if there is a preference on how to fix this, I'd be glad to regenerate the patch.<BR>
<BR>
<BR>
--<BR>
<BR>
paul</FONT>
</P>

</BODY>
</HTML>