]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: cache: avoid a build warning with some compilers/linkers
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 17:26:52 +0000 (18:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 20:03:24 +0000 (21:03 +0100)
commit2231b638877aff9fc215377f9d6952630fb31d3c
tree020cd0b95b8206439583f13c6a14348f49a0e217
parent72d9f3351dcf154320add16431c60bac63e1106c
BUILD: cache: avoid a build warning with some compilers/linkers

The struct http_cache_applet was fully declared at the beginning
instead of just doing a forward declaration using an extern modifier.
Some linkers report warnings about a redefined symbol since these
really are two complete declarations.

The proper way to do this is to use extern on the first one and to
have a full declaration later. However it's not permitted to have
both static and extern so the change done in commit 0f2229943
("CLEANUP: cache: don't export http_cache_applet anymore") has to
be partially undone.

This should be backported to 1.9 for sanity but has no effet on
most platforms. However on 1.9 the extern keyword must also be
added to include/types/cache.h.
src/cache.c