summaryrefslogtreecommitdiff
path: root/include/event2/rpc_struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/event2/rpc_struct.h')
-rw-r--r--include/event2/rpc_struct.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/event2/rpc_struct.h b/include/event2/rpc_struct.h
index 8f691f49..f3cb460a 100644
--- a/include/event2/rpc_struct.h
+++ b/include/event2/rpc_struct.h
@@ -38,6 +38,16 @@ extern "C" {
*/
+/* Fix so that people don't have to run with <sys/queue.h> */
+#ifndef TAILQ_ENTRY
+#define EVENT_DEFINED_TQENTRY_
+#define TAILQ_ENTRY(type) \
+struct { \
+ struct type *tqe_next; /* next element */ \
+ struct type **tqe_prev; /* address of previous next element */ \
+}
+#endif /* !TAILQ_ENTRY */
+
/**
* provides information about the completed RPC request.
*/
@@ -93,6 +103,10 @@ struct evrpc {
struct evrpc_base *base;
};
+#ifdef EVENT_DEFINED_TQENTRY_
+#undef TAILQ_ENTRY
+#endif
+
#ifdef __cplusplus
}
#endif