Skip to content

Commit

Permalink
Build: cleanups for C++ compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Aug 26, 2015
1 parent 7f5606b commit cd2f696
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions include/fluent-bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#ifndef FLUENT_BIT_H
#define FLUENT_BIT_H

#ifdef __cplusplus
extern "C" {
#endif

#include <mk_core/mk_core.h>
#include <fluent-bit/flb_macros.h>
#include <fluent-bit/flb_utils.h>
Expand All @@ -29,4 +33,9 @@
#include <fluent-bit/flb_output.h>
#include <fluent-bit/flb_engine.h>
#include <fluent-bit/flb_lib.h>

#ifdef __cplusplus
}
#endif

#endif
1 change: 0 additions & 1 deletion src/flb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

struct flb_config *flb_config_init()
{
int ret;
struct flb_config *config;

__flb_config_verbose = FLB_FALSE;
Expand Down
4 changes: 4 additions & 0 deletions src/flb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ int flb_lib_start(struct flb_config *config)
mk_event_foreach(event, config->ch_evl) {
fd = event->fd;
bytes = read(fd, &val, sizeof(uint64_t));
if (bytes <= 0) {
return -1;
}

if (val == FLB_ENGINE_STARTED) {
flb_debug("[lib] backend started");
break;
Expand Down

0 comments on commit cd2f696

Please sign in to comment.