Skip to content

Commit

Permalink
Apply patch from PR 8901
Browse files Browse the repository at this point in the history
  • Loading branch information
j0057 committed Jun 6, 2024
1 parent 114dac1 commit 0227b8c
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ pkgbase = fluent-bit
backup = etc/fluent-bit/fluent-bit.conf
backup = etc/fluent-bit/parsers.conf
source = fluent-bit-3.0.2.tar.gz::https://releases.fluentbit.io/3.0/source-3.0.2.tar.gz
source = pr-8901.patch
md5sums = 6c8ed6033a0405bf41a0d28af4c57d90
md5sums = SKIP
sha256sums = 1ebe15d48db1e6a06545e6ffc788d0eb82d74923f8ca6a6e53b327c8e3011b6f
sha256sums = SKIP

pkgname = fluent-bit
13 changes: 10 additions & 3 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ backup=('etc/fluent-bit/fluent-bit.conf'
options=()
install=
changelog=
source=("$pkgname-$pkgver.tar.gz::https://releases.fluentbit.io/${pkgver%.*}/source-$pkgver.tar.gz")
source=("$pkgname-$pkgver.tar.gz::https://releases.fluentbit.io/${pkgver%.*}/source-$pkgver.tar.gz"
pr-8901.patch)
noextract=()
validpgpkeys=()

prepare() {
patch -p1 < pr-8901.patch
}

build() {
cd "$srcdir/build"
cmake \
Expand Down Expand Up @@ -71,5 +76,7 @@ package() {
}

# r!. %; curl -s https://releases.fluentbit.io/${pkgver\%.*}/source-$pkgver.tar.gz.{md5,sha256} | awk '{print $1}'
md5sums=('6c8ed6033a0405bf41a0d28af4c57d90')
sha256sums=('1ebe15d48db1e6a06545e6ffc788d0eb82d74923f8ca6a6e53b327c8e3011b6f')
md5sums=('6c8ed6033a0405bf41a0d28af4c57d90'
'SKIP')
sha256sums=('1ebe15d48db1e6a06545e6ffc788d0eb82d74923f8ca6a6e53b327c8e3011b6f'
'SKIP')
56 changes: 56 additions & 0 deletions pr-8901.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From 33690ee3fd6ad97f3f1917a1a91bd4c4f1f235d6 Mon Sep 17 00:00:00 2001
From: javex <florian.ruechel@inexplicity.de>
Date: Fri, 31 May 2024 21:25:38 +0930
Subject: [PATCH 1/2] tls: Type cast explicitly for OpenSSL

With the release of GCC 14.1, some previous warnings are now errors,
including the SSL_select_next_proto call in
tls_context_server_alpn_select_callback. To fix the build, add
explicitly type cast.

Signed-off-by: javex <florian.ruechel@inexplicity.de>
---
src/tls/openssl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tls/openssl.c b/src/tls/openssl.c
index 14b77e09c6a..03aeb9610b7 100644
--- a/src/tls/openssl.c
+++ b/src/tls/openssl.c
@@ -217,7 +217,7 @@ static int tls_context_server_alpn_select_callback(SSL *ssl,
result = SSL_TLSEXT_ERR_NOACK;

if (ctx->alpn != NULL) {
- result = SSL_select_next_proto(out,
+ result = SSL_select_next_proto((unsigned char **) out,
outlen,
&ctx->alpn[1],
(unsigned int) ctx->alpn[0],

From 944bb0ce680c6f92c20fddfb7442a19e4cfe0a36 Mon Sep 17 00:00:00 2001
From: javex <florian.ruechel@inexplicity.de>
Date: Fri, 31 May 2024 21:27:57 +0930
Subject: [PATCH 2/2] in_kubernetes_events: Type cast explicitly

With the release of GCC 14.1, some previous warnings are now errors,
including the check_event_is_filtered call in
process_events. To fix the build, add explicitly type cast.

Signed-off-by: javex <florian.ruechel@inexplicity.de>
---
plugins/in_kubernetes_events/kubernetes_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/in_kubernetes_events/kubernetes_events.c b/plugins/in_kubernetes_events/kubernetes_events.c
index 6231becb0ad..22a69b65af4 100644
--- a/plugins/in_kubernetes_events/kubernetes_events.c
+++ b/plugins/in_kubernetes_events/kubernetes_events.c
@@ -487,7 +487,7 @@ static int process_events(struct k8s_events *ctx, char *in_data, size_t in_size,
goto msg_error;
}

- if (check_event_is_filtered(ctx, item, &ts) == FLB_TRUE) {
+ if (check_event_is_filtered(ctx, item, (time_t *) &ts) == FLB_TRUE) {
continue;
}

0 comments on commit 0227b8c

Please sign in to comment.