From: Peter Marko <[email protected]>

Sumbitted to https://github.com/syslog-ng/syslog-ng/pull/4880

Signed-off-by: Peter Marko <[email protected]>
---
 ...ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch | 40 +++++++++++++++++++
 .../syslog-ng/syslog-ng_4.6.0.bb              |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 
meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch

diff --git 
a/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch
 
b/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch
new file mode 100644
index 000000000..f21ad5d70
--- /dev/null
+++ 
b/meta-oe/recipes-support/syslog-ng/files/0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch
@@ -0,0 +1,40 @@
+From 896d77dd949b52d6ea5798e5a038ba97d6b802be Mon Sep 17 00:00:00 2001
+From: Peter Marko <[email protected]>
+Date: Thu, 4 Apr 2024 15:44:18 +0200
+Subject: [PATCH] macros: guard ipv6 code with SYSLOG_NG_ENABLE_IPV6
+
+With ipv6 disabled, there are linking errors currently.
+This fixes it by not using the symbols when IPv6 is disabled.
+
+Solves #4810 with my config options
+https://github.com/openembedded/meta-openembedded/blob/2487e65ee3842b6ae0c7a2628985be6189ed9ebf/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
+
+Upstream-Status: Submitted [https://github.com/syslog-ng/syslog-ng/pull/4880]
+
+Signed-off-by: Peter Marko <[email protected]>
+---
+ lib/template/macros.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/template/macros.c b/lib/template/macros.c
+index 54142706c..fcb83637f 100644
+--- a/lib/template/macros.c
++++ b/lib/template/macros.c
+@@ -277,12 +277,14 @@ _get_originating_ip_protocol(const LogMessage *msg)
+     return 0;
+   if (g_sockaddr_inet_check(msg->saddr))
+     return 4;
++#if SYSLOG_NG_ENABLE_IPV6
+   if (g_sockaddr_inet6_check(msg->saddr))
+     {
+       if (g_sockaddr_inet6_is_v4_mapped(msg->saddr))
+         return 4;
+       return 6;
+     }
++#endif
+   return 0;
+ }
+ 
+-- 
+2.30.2
+
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb 
b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
index 4cc5d8451..458494415 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng_4.6.0.bb
@@ -23,6 +23,7 @@ SRC_URI = 
"https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta
            file://syslog-ng-tmp.conf \
            file://syslog-ng.service-the-syslog-ng-service.patch \
            file://0001-Fix-buildpaths-warning.patch \
+           file://0001-macros-guard-ipv6-code-with-SYSLOG_NG_ENABLE_IPV6.patch 
\
 "
 SRC_URI:append:powerpc64le = " 
file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch"
 
-- 
2.30.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#109807): 
https://lists.openembedded.org/g/openembedded-devel/message/109807
Mute This Topic: https://lists.openembedded.org/mt/105337787/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to