]> granicus.if.org Git - libevent/commitdiff
Fix AIX build issue with TAILQ_FOREACH definition
authorNick Mathewson <nickm@torproject.org>
Wed, 22 Jun 2011 15:22:35 +0000 (11:22 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 22 Jun 2011 15:22:35 +0000 (11:22 -0400)
Reported by Lawnstein Chan.

event-internal.h

index 12ca8bc194d09a9498cdb7c4c85c98620d7fdc9f..74c2a396743ccabe4840f5ca439cc702138e5590 100644 (file)
@@ -313,10 +313,12 @@ struct event_config {
 #define        TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
 #endif
 
+#ifndef TAILQ_FOREACH
 #define TAILQ_FOREACH(var, head, field)                                        \
        for ((var) = TAILQ_FIRST(head);                                 \
             (var) != TAILQ_END(head);                                  \
             (var) = TAILQ_NEXT(var, field))
+#endif
 
 #ifndef TAILQ_INSERT_BEFORE
 #define        TAILQ_INSERT_BEFORE(listelm, elm, field) do {                   \