Commit d92216e1 authored by Timo Teräs's avatar Timo Teräs

main/opennhrp: fix build on musl

parent a5578964
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=opennhrp
pkgver=0.14.1
pkgrel=1
pkgrel=2
pkgdesc="NBMA Next Hop Resolution Protocol daemon"
url="http://sourceforge.net/projects/opennhrp"
arch="all"
......@@ -12,6 +12,7 @@ subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
opennhrp-0.9.3-peer-up-bgp.patch
reset-nat.patch
fix-includes-and-types-to-honor-standards.patch
$pkgname.initd
$pkgname.confd
"
......@@ -36,15 +37,18 @@ package() {
md5sums="eb42ddb13e07ceb415b9ebb8eaca28ee opennhrp-0.14.1.tar.bz2
f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch
2b31e177d56b18c942abb0e9d43e457d reset-nat.patch
751d1b77866aefb312f98f60a454904a fix-includes-and-types-to-honor-standards.patch
ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd
8eee86233728dc0d156bbfee6d98f338 opennhrp.confd"
sha256sums="1517d53d688ffc165a1da20c344d96b4c53e60f34bd73c64e60cb67cfca4e9ab opennhrp-0.14.1.tar.bz2
d348cc75694761124a7e05406d9e21e59251be185356bd3d3bec8dcc9dbbac73 opennhrp-0.9.3-peer-up-bgp.patch
2b362cd953023a1fd22f42071fc284c581f1c34128f98c9e409fe79f384e77f0 reset-nat.patch
56e23b367a985b55fc6d0b7ecdd8520a719f278005dbc057dd417d1c00061aea fix-includes-and-types-to-honor-standards.patch
40a260ecda7b7caca03a914c7ef7819023f54b0b3bd97189bd88f8f7275d70d7 opennhrp.initd
83a7ad5e94546dbdfaabf0dd12c0d2e611b89cab06c600499e9453777e28928f opennhrp.confd"
sha512sums="dd0d5debf86d195256995406909c7406d4b60dcdd3a47fca95fd7053b1691e1863b430ff9d65e8633c2d49c747abb4fdc10b45bdef0d0bfa733e94e33c476785 opennhrp-0.14.1.tar.bz2
6ce107a2ad59331ab130108b49e80de5902d96002480f0465f7ad15b5146637a67982d2edaa392117a3f1820381b6b4a8985bef2a49364ce269c0bbc632d1739 opennhrp-0.9.3-peer-up-bgp.patch
53d45f89b2643c71734c2404c5f229ab8cf107ea9c2e2ed4f64ab03c825b2438670e606508c5d79afedd984171f0ea3546324917ad86bc7e1e2e36573a53d283 reset-nat.patch
bfa1da32bbdb0a804a578b4dcaa36b9b4e1116870b5546d7a8510ea1aacba611be8674f51147ce577f64ff64416bdba28231729f137fd9b5fb0a2d84e050d668 fix-includes-and-types-to-honor-standards.patch
3ca19432d0873f2746d4abc324c3fa5f54d528d4fdaba5f059a183b3ae882f08acd31cb3f1cdbd197942632b0086dee198d1007a504572ab269f79c144ef716d opennhrp.initd
c998a0ba198e187c72d09ed3ba2e12fbd30c5d998ed06da01394058741c28a534f1c7e9d692f931ff00dac76c7d4e19e911f7d2ad48deb94f0cef8bd706c4315 opennhrp.confd"
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;
--
1.8.4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment