From: Willy Tarreau Date: Mon, 19 Apr 2021 16:36:48 +0000 (+0200) Subject: BUILD: pools: fix build with DEBUG_FAIL_ALLOC X-Git-Tag: v2.4-dev17~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=942b89f7dc9a6fcd2deedef078aba67609d12e54;p=thirdparty%2Fhaproxy.git BUILD: pools: fix build with DEBUG_FAIL_ALLOC Amaury noticed that I managed to break the build of DEBUG_FAIL_ALLOC for the second time with 207c09509 ("MINOR: pools: move the fault injector to __pool_alloc()"). The joy of endlessly reworking patch sets... No backport is needed, that was in the just merged cleanup series. --- diff --git a/include/haproxy/pool.h b/include/haproxy/pool.h index 54ec933468..a7d77e4c6b 100644 --- a/include/haproxy/pool.h +++ b/include/haproxy/pool.h @@ -63,6 +63,7 @@ struct pool_head *create_pool(char *name, unsigned int size, unsigned int flags) void create_pool_callback(struct pool_head **ptr, char *name, unsigned int size); void *pool_destroy(struct pool_head *pool); void pool_destroy_all(); +int mem_should_fail(const struct pool_head *pool); #ifdef CONFIG_HAP_POOLS diff --git a/src/pool.c b/src/pool.c index 88c579b6d5..70095021ad 100644 --- a/src/pool.c +++ b/src/pool.c @@ -38,7 +38,6 @@ int mem_poison_byte = -1; #ifdef DEBUG_FAIL_ALLOC static int mem_fail_rate = 0; -static int mem_should_fail(const struct pool_head *); #endif /* Try to find an existing shared pool with the same characteristics and