From c8fed6366ee18e6927f855111dd037bf7198c27c Mon Sep 17 00:00:00 2001 From: Bryce Gibson Date: Wed, 5 Jun 2024 13:13:11 +1000 Subject: [PATCH] config: fix compilation with `FLB_HAVE_STATIC_CONF` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: ``` /tmp/fluent-bit/src/config_format/flb_cf_fluentbit.c: In function ‘read_config’: /tmp/fluent-bit/src/config_format/flb_cf_fluentbit.c:505:30: error: ‘FLB_CF_BUF_SIZE’ undeclared (first use in this function); did you mean ‘FLB_CF_CUSTOM’? while (static_fgets(buf, FLB_CF_BUF_SIZE, in_data, &off)) { ^~~~~~~~~~~~~~~ ``` --- src/config_format/flb_cf_fluentbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config_format/flb_cf_fluentbit.c b/src/config_format/flb_cf_fluentbit.c index df77afd9c53..2a5e80a387a 100644 --- a/src/config_format/flb_cf_fluentbit.c +++ b/src/config_format/flb_cf_fluentbit.c @@ -502,7 +502,7 @@ static int read_config(struct flb_cf *cf, struct local_ctx *ctx, * workaround to retrieve the lines. */ size_t off = 0; - while (static_fgets(buf, FLB_CF_BUF_SIZE, in_data, &off)) { + while (static_fgets(buf, FLB_DEFAULT_CF_BUF_SIZE, in_data, &off)) { #else /* normal mode, read lines into a buffer */ /* note that we use "fgets_ptr" so we can continue reading after realloc */