Skip to content

Commit

Permalink
http_client: use FLB_HAVE_TLS to selectively build with tls/non-tls
Browse files Browse the repository at this point in the history
This commit updates flb_http_client.h and use FLB_HAVE_TLS
so that it is possible to build with tls and non-tls.

SInce flb_http_client pretty much depends on TLS,
this commit use FLB_HAVE_TLS to exclude build in case
non-tls build is encountered.

This commit is part of the effort to address the issue
raised in fluent#2999 where it was not possible to disable TLS
to build fluent-bit.

Signed-off-by: Yong Tang <[email protected]>
  • Loading branch information
yongtang committed Feb 12, 2021
1 parent 29a042a commit e2daf98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fluent-bit/flb_http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#ifndef FLB_HTTP_CLIENT_H
#define FLB_HTTP_CLIENT_H

#ifdef FLB_HAVE_TLS

#include <fluent-bit/flb_io.h>
#include <fluent-bit/flb_upstream.h>

Expand Down Expand Up @@ -168,4 +170,6 @@ int flb_http_strip_port_from_host(struct flb_http_client *c);
int flb_http_allow_duplicated_headers(struct flb_http_client *c, int allow);
int flb_http_client_debug_property_is_valid(char *key, char *val);

#endif /* FLB_HAVE_TLS */

#endif
4 changes: 4 additions & 0 deletions include/fluent-bit/flb_http_client_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#ifndef FLB_HTTP_CLIENT_DEBUG_H
#define FLB_HTTP_CLIENT_DEBUG_H

#ifdef FLB_HAVE_TLS

#include <fluent-bit/flb_info.h>
#include <fluent-bit/flb_callback.h>

Expand All @@ -34,4 +36,6 @@ int flb_http_client_debug_setup(struct flb_callback *cb_ctx,
struct mk_list *props);
int flb_http_client_debug_cb(struct flb_http_client *c, char *name);

#endif /* FLB_HAVE_TLS */

#endif

0 comments on commit e2daf98

Please sign in to comment.