opennhrp: fix musl compatibility 1481/head
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jun 2015 13:44:52 +0000 (15:44 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Jun 2015 13:48:25 +0000 (15:48 +0200)
 - Add `fcntl.h` to `nrhp/opennhrp.c` for `open()`, `O_WRONLY` etc.
 - Add missing `sys/types.h` include to `nrhp/nrhp_common.h` to provide
   required `u_int*_t` types under musl

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
net/opennhrp/Makefile
net/opennhrp/patches/100-musl-compat.patch [new file with mode: 0644]

index 449e0a6fb1b07be8de084cb35d3147c40f0f2c59..4c2b9e8278f23a904b73706fb47fd2a96e94018e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2011 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
 # Copyright (C) 2009 Jakob Pfeiffer
 # Copyright (C) 2014 Artem Makhutov
 #
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opennhrp
 PKG_VERSION:=0.14.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Artem Makhutov <artem@makhutov.org>
 PKG_LICENSE:=MIT License
 
diff --git a/net/opennhrp/patches/100-musl-compat.patch b/net/opennhrp/patches/100-musl-compat.patch
new file mode 100644 (file)
index 0000000..8be0f71
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/nhrp/opennhrp.c
++++ b/nhrp/opennhrp.c
+@@ -9,6 +9,7 @@
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <malloc.h>
+ #include <stddef.h>
+ #include <string.h>
+--- a/nhrp/nhrp_common.h
++++ b/nhrp/nhrp_common.h
+@@ -12,6 +12,7 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <sys/time.h>
++#include <sys/types.h>
+ #include <linux/if_ether.h>
+ struct nhrp_interface;