Skip to content

Commit

Permalink
config_format: check if Yaml support exists before using FLB_CF_YAML
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Aug 30, 2023
1 parent 4dfacb5 commit 7ab07aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config_format/flb_config_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ void flb_cf_destroy(struct flb_cf *cf)

int flb_cf_set_origin_format(struct flb_cf *cf, int format)
{
#ifdef FLB_HAVE_LIBYAML
if (format != FLB_CF_CLASSIC && format != FLB_CF_YAML) {
#else
if (format != FLB_CF_CLASSIC) {
#endif
return -1;
}

Expand Down

0 comments on commit 7ab07aa

Please sign in to comment.