mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
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.
This commit is contained in:
parent
72d9f3351d
commit
2231b63887
@ -48,7 +48,7 @@
|
||||
|
||||
const char *cache_store_flt_id = "cache store filter";
|
||||
|
||||
static struct applet http_cache_applet;
|
||||
extern struct applet http_cache_applet;
|
||||
|
||||
struct flt_ops cache_ops;
|
||||
|
||||
@ -1839,7 +1839,7 @@ static struct action_kw_list http_req_actions = {
|
||||
|
||||
INITCALL1(STG_REGISTER, http_req_keywords_register, &http_req_actions);
|
||||
|
||||
static struct applet http_cache_applet = {
|
||||
struct applet http_cache_applet = {
|
||||
.obj_type = OBJ_TYPE_APPLET,
|
||||
.name = "<CACHE>", /* used for logging */
|
||||
.fct = http_cache_io_handler,
|
||||
|
Loading…
x
Reference in New Issue
Block a user