Skip to content

Commit

Permalink
config: fix compilation with FLB_HAVE_STATIC_CONF
Browse files Browse the repository at this point in the history
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)) {
                              ^~~~~~~~~~~~~~~
```

This applies the same change made in
f50a02e when `FLB_HAVE_STATIC_CONF` is
defined.

Signed-off-by: Bryce Gibson <[email protected]>
  • Loading branch information
bglimepoint committed Jun 5, 2024
1 parent 8aee285 commit f0330f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config_format/flb_cf_fluentbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, bufsize - (fgets_ptr - buf), in_data, &off)) {
#else
/* normal mode, read lines into a buffer */
/* note that we use "fgets_ptr" so we can continue reading after realloc */
Expand Down

0 comments on commit f0330f3

Please sign in to comment.