summaryrefslogtreecommitdiff
path: root/net-misc/olsrd/files/olsrd-0.9.8-clang16-buildfix.patch
blob: 0194b17362ba8e8a86b9a4e78434cccdd9be540e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
   };