ctorrent: fix musl compatibility
authorJo-Philipp Wich <redacted>
Tue, 30 Jun 2015 09:08:45 +0000 (11:08 +0200)
committerJo-Philipp Wich <redacted>
Tue, 30 Jun 2015 09:09:46 +0000 (11:09 +0200)
Add missing `sys/types.h` include to `strnstr()` replacement code in
`compat.c` in order to declare `ssize_t` type under musl.

Signed-off-by: Jo-Philipp Wich <redacted>
net/ctorrent/Makefile
net/ctorrent/patches/200-musl-compat.patch [new file with mode: 0644]

index 16504e2a34b24d19311e2b72de5dced30275bd3f..6a8e48189b4a9c35f56e118970e45bf084121491 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ctorrent
 PKG_VERSION:=dnh3.3.2
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/dtorrent \
diff --git a/net/ctorrent/patches/200-musl-compat.patch b/net/ctorrent/patches/200-musl-compat.patch
new file mode 100644 (file)
index 0000000..65cb71e
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/compat.c
++++ b/compat.c
+@@ -63,6 +63,7 @@ int snprintf(char *str, size_t size, con
+ #ifndef HAVE_STRNSTR
+ #include <string.h>
++#include <sys/types.h>
+ /* FUNCTION PROGRAMER: Siberiaic Sang */
+ char *strnstr(const char *haystack, const char *needle, size_t haystacklen)
+ {
git clone https://git.99rst.org/PROJECT