fluent-bit: update to 3.1.9
authorRosen Penev <rosenp@gmail.com>
Thu, 31 Oct 2024 20:59:53 +0000 (13:59 -0700)
committerHannu Nyman <hannu.nyman@iki.fi>
Mon, 11 Nov 2024 16:48:55 +0000 (18:48 +0200)
Add patch from Alpine to fix compilation with GCC14.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
admin/fluent-bit/Makefile
admin/fluent-bit/patches/010-musl-strerror_r.patch [new file with mode: 0644]

index a4c2e5a4a7367eac5f5b43df98e3bc9747f19740..6fc245eebcc2795c2e3d0937e1fccb12b787c70a 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fluent-bit
-PKG_VERSION:=3.1.3
+PKG_VERSION:=3.1.9
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
 PKG_SOURCE_VERSION=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=85b861693a9ed597e4e55e30330dd2fb96daa997eb71424a55ccc28de92eef78
+PKG_MIRROR_HASH:=cb81f94e4d4b1cb88dee06f9534efbb7fdc92a24d950cab7ccbd1a01d89bf908
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
diff --git a/admin/fluent-bit/patches/010-musl-strerror_r.patch b/admin/fluent-bit/patches/010-musl-strerror_r.patch
new file mode 100644 (file)
index 0000000..4f65f49
--- /dev/null
@@ -0,0 +1,30 @@
+Fix -Wint-conversion error with gcc 14 due to musl using POSIX strerror_r.
+
+```
+/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c: In function 'net_connect_async':
+/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c:566:17: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
+  566 |             str = strerror_r(error, so_error_buf, sizeof(so_error_buf));
+```
+
+--- a/src/flb_network.c
++++ b/src/flb_network.c
+@@ -551,9 +551,6 @@ static int net_connect_async(int fd,
+             }
+             /* Connection is broken, not much to do here */
+-#if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) ||    \
+-     (defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0L >= 600L)) &&     \
+-  (!defined(_GNU_SOURCE))
+             ret = strerror_r(error, so_error_buf, sizeof(so_error_buf));
+             if (ret == 0) {
+                 str = so_error_buf;
+@@ -562,9 +559,6 @@ static int net_connect_async(int fd,
+                 flb_errno();
+                 return -1;
+             }
+-#else
+-            str = strerror_r(error, so_error_buf, sizeof(so_error_buf));
+-#endif
+             flb_error("[net] TCP connection failed: %s:%i (%s)",
+                       u->tcp_host, u->tcp_port, str);
+             return -1;