]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] silent warning about LIST_* being redefined on OpenBSD
authorWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2007 10:41:06 +0000 (11:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2007 10:41:06 +0000 (11:41 +0100)
Building ev_kqueue on OpenBSD causes some warnings to occur,
because OpenBSD also uses LIST_* macros in sys/queue.h, included
from sys/event.h. Simply undefine those macros since we don't
need them.

include/common/mini-clist.h

index caed2dc00c8783157c1493de5e5254f03870d604..9fe342de8c46becdaaff0276daefa794cec3e9df 100644 (file)
@@ -19,6 +19,13 @@ struct list {
     struct list *p;    /* prev */
 };
 
+/* First undefine some macros which happen to also be defined on OpenBSD,
+ * in sys/queue.h, used by sys/event.h
+ */
+#undef LIST_HEAD
+#undef LIST_INIT
+#undef LIST_NEXT
+
 #define LIST_HEAD(a)   ((void *)(&(a)))
 
 #define LIST_INIT(l) ((l)->n = (l)->p = (l))