diff options
Diffstat (limited to 'meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch')
-rw-r--r-- | meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch new file mode 100644 index 0000000000..8d89e4df35 --- /dev/null +++ b/meta-oe/recipes-extended/fluentbit/fluentbit/0001-Use-posix-strerror_r-with-musl.patch @@ -0,0 +1,34 @@ +From f645128082117a0152a95b3dccd869a184b7513f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 10 Aug 2022 01:23:48 -0700 +Subject: [PATCH 1/2] Use posix strerror_r with musl + +Default with glibc is GNU extention of strerror_r +where as musl uses posix variant, call that out + +Upstream-Status: Inappropriate [Need wider porting beyond linux/musl/glibc] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/flb_network.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/flb_network.c b/src/flb_network.c +index 992eb1d..5d7a337 100644 +--- a/src/flb_network.c ++++ b/src/flb_network.c +@@ -506,7 +506,12 @@ static int net_connect_async(int fd, + } + + /* Connection is broken, not much to do here */ ++#ifdef __GLIBC__ + str = strerror_r(error, so_error_buf, sizeof(so_error_buf)); ++#else ++ strerror_r(error, so_error_buf, sizeof(so_error_buf)); ++ str = so_error_buf; ++#endif + flb_error("[net] TCP connection failed: %s:%i (%s)", + u->tcp_host, u->tcp_port, str); + return -1; +-- +2.37.1 + |