summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-06-13 15:21:22 +0000
committerViorel Munteanu <ceamac@gentoo.org>2023-06-16 08:43:39 +0300
commitab73df0b66d343f94f5c7815cbb04cb1b966b502 (patch)
tree7590ed8693faea36e0819131db74db90c78a61f3 /net-misc/olsrd/files
parentdev-util/cucumber: drop 7.1.0 (diff)
downloadgentoo-ab73df0b66d343f94f5c7815cbb04cb1b966b502.tar.gz
gentoo-ab73df0b66d343f94f5c7815cbb04cb1b966b502.tar.bz2
gentoo-ab73df0b66d343f94f5c7815cbb04cb1b966b502.zip
net-misc/olsrd: Fix incompatible pointer to integer conversion initializing int
Closes: https://bugs.gentoo.org/898090 Closes: https://bugs.gentoo.org/870748 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31242 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'net-misc/olsrd/files')
-rw-r--r--net-misc/olsrd/files/olsrd-0.9.8-clang16-buildfix.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/net-misc/olsrd/files/olsrd-0.9.8-clang16-buildfix.patch b/net-misc/olsrd/files/olsrd-0.9.8-clang16-buildfix.patch
new file mode 100644
index 000000000000..0194b17362ba
--- /dev/null
+++ b/net-misc/olsrd/files/olsrd-0.9.8-clang16-buildfix.patch
@@ -0,0 +1,53 @@
+https://github.com/OLSR/olsrd/pull/124
+--- a/lib/filtergw/src/olsrd_filtergw.c
++++ b/lib/filtergw/src/olsrd_filtergw.c
+@@ -54,6 +54,7 @@
+ #include "log.h"
+ #include "routing_table.h"
+ #include "olsr_cfg.h"
++#include "parser.h"
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -75,11 +76,19 @@ struct originator_list {
+
+ struct filter_group {
+ struct originator_list * originator_list;
+- struct hna_group * next;
++ struct filter_group * next;
+ };
+
+ static struct filter_group * filter_groups = NULL;
+
++/*
++ * Delcaring function prototype here, fixes build error with clang-16.
++ * Clang 16 enables -Wimplicit-function-declaration by default, hence the
++ * error.
++ * Refer: https://bugs.gentoo.org/898090
++ */
++int should_filter(union olsr_ip_addr * originator);
++
+ /* -------------------------------------------------------------------------
+ * Function : add_to_originator_list
+ * Description: Add a new ip to originator list
+@@ -304,4 +313,4 @@ int should_filter(union olsr_ip_addr * originator)
+ }
+ }
+ return is_allowlist ? !found : found;
+-}
+\ No newline at end of file
++}
+--- a/src/linux/kernel_routes_nl.c
++++ b/src/linux/kernel_routes_nl.c
+@@ -161,7 +161,11 @@ static void rtnetlink_read(int sock, void *data __attribute__ ((unused)), unsign
+ sizeof(nladdr),
+ &iov,
+ 1,
++#ifndef __GLIBC__
++ 0,
++#else
+ NULL,
++#endif
+ 0,
+ 0
+ };