babeld: update to 1.13
[feed/routing.git] / babeld / patches / 100-local-make-local_kind-function-accessible.patch
1 From b29cb705c3b717a7d5c61719936464438b9a48f0 Mon Sep 17 00:00:00 2001
2 From: Nick Hainke <vincent@systemli.org>
3 Date: Fri, 15 Jan 2021 15:01:31 +0100
4 Subject: [PATCH] local: make local_kind function accessible
5
6 The kind-definitions are contained in the header file:
7 LOCAL_FLUSH 0
8 LOCAL_ADD 1
9 LOCAL_CHANGE 2
10
11 The function (local_kind) that converts them into strings again
12 is private. New addons (for example openwrt ubus bindings) that make
13 use of babeld should also use the same function to convert the kind
14 to string format. This allows to ensure uniformity over all addons.
15
16 Signed-off-by: Nick Hainke <vincent@systemli.org>
17 ---
18 local.c | 2 +-
19 local.h | 1 +
20 2 files changed, 2 insertions(+), 1 deletion(-)
21
22 --- a/local.c
23 +++ b/local.c
24 @@ -80,7 +80,7 @@ write_timeout(int fd, const void *buf, i
25 }
26 }
27
28 -static const char *
29 +const char *
30 local_kind(int kind)
31 {
32 switch(kind) {
33 --- a/local.h
34 +++ b/local.h
35 @@ -55,3 +55,4 @@ int local_read(struct local_socket *s);
36 int local_header(struct local_socket *s);
37 struct local_socket *local_socket_create(int fd);
38 void local_socket_destroy(int i);
39 +const char *local_kind(int kind);