/* Consume an unsigned 64 bit number from fd */ static inline int consume_byte(flb_pipefd_t fd) { int ret; uint64_t val; /* We need to consume the byte */ ret = flb_pipe_r(fd, &val, sizeof(val)); /* ref: https://github.com/fluent/fluent-bit/pull/2463 */ // #if defined(__APPLE__) || __FreeBSD__ >= 12 if (ret < 0) { // #else // if (ret <= 0) { // #endif flb_errno(); return -1; } return 0; }