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
54
55
56
57
58
59
60
61
62
|
From 80c569aa4b4efbf7d24c5cde8a33ebff2a4b6685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Thu, 26 Sep 2013 19:24:45 +0300
Subject: [PATCH] all: fix includes, and types to honor standards
fixes build against musl.
---
nhrp/nhrp_common.h | 2 +-
nhrp/opennhrp.c | 1 +
nhrp/sysdep_netlink.c | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/nhrp/nhrp_common.h b/nhrp/nhrp_common.h
index 9422382..395713e 100644
--- a/nhrp/nhrp_common.h
+++ b/nhrp/nhrp_common.h
@@ -60,7 +60,7 @@ int kernel_route(struct nhrp_interface *out_iface,
struct nhrp_address *dest,
struct nhrp_address *default_source,
struct nhrp_address *next_hop,
- u_int16_t *mtu);
+ uint16_t *mtu);
int kernel_send(uint8_t *packet, size_t bytes, struct nhrp_interface *out,
struct nhrp_address *to);
int kernel_inject_neighbor(struct nhrp_address *neighbor,
diff --git a/nhrp/opennhrp.c b/nhrp/opennhrp.c
index 4ed27a8..03e9682 100644
--- a/nhrp/opennhrp.c
+++ b/nhrp/opennhrp.c
@@ -8,6 +8,7 @@
#include <ctype.h>
#include <stdio.h>
+#include <fcntl.h>
#include <errno.h>
#include <malloc.h>
#include <stddef.h>
diff --git a/nhrp/sysdep_netlink.c b/nhrp/sysdep_netlink.c
index be529d8..1217ae4 100644
--- a/nhrp/sysdep_netlink.c
+++ b/nhrp/sysdep_netlink.c
@@ -64,7 +64,7 @@ static struct netlink_fd netlink_fds[ARRAY_SIZE(netlink_groups)];
static struct ev_io packet_io;
-static u_int16_t translate_mtu(u_int16_t mtu)
+static uint16_t translate_mtu(uint16_t mtu)
{
/* if mtu is ethernet standard, do not advertise it
* pmtu should be working */
@@ -1001,7 +1001,7 @@ int kernel_route(struct nhrp_interface *out_iface,
struct nhrp_address *dest,
struct nhrp_address *default_source,
struct nhrp_address *next_hop,
- u_int16_t *mtu)
+ uint16_t *mtu)
{
struct {
struct nlmsghdr n;
--
2.4.6
|