Hi --
Subject: HAProxy 1.5.10 and 1.5.11 redefine a symbol on FreeBSD 10.1
Index: src/ev_kqueue.c, include/common/mini-clist.h
Synopsis:
On FreeBSD 10.1 (probably also 10.0, and maybe earlier), a compiler warning
is emitted because the macro LIST_PREV is redefined:
% make TARGET=freebsd CC=gcc49 CPU_FLAGS=
gcc49 -Iinclude -Iebtree -Wall -DDACS -DTPROXY -DCONFIG_HAP_CRYPT \
-DENABLE_POLL -DENABLE_KQUEUE -DUSE_OPENSSL -DUSE_PCRE -I/usr/local/include \
-DCONFIG_HAPROXY_VERSION=\"1.5.11\" -DCONFIG_HAPROXY_DATE=\"2015/01/31\" \
-c -o src/ev_kqueue.o src/ev_kqueue.c
In file included from include/types/listener.h:33:0,
from include/types/global.h:29,
from src/ev_kqueue.c:26:
include/common/mini-clist.h:147:0: warning: "LIST_PREV" redefined
#define LIST_PREV(lh, pt, el) (LIST_ELEM((lh)->p, pt, el))
^
In file included from /usr/include/sys/event.h:32:0,
from src/ev_kqueue.c:17:
/usr/include/sys/queue.h:461:0: note: this is the location of the previous
definition
#define LIST_PREV(elm, head, type, field) \
^
Fix:
This general issue seems to have already been seen with related macros for
OpenBSD. At about line 52 of include/common/mini-clist.h, add:
#undef LIST_PREV
Perhaps the other LIST_* macros defined in mini-clist.h should also be
explicitly undefined to avoid future naming conflicts.
Thanks,
Barry
** Barry Brachman, Ph.D.
** Distributed Systems Software, Inc.
** http://www.dss.ca
** Email: [email protected] | [email protected]