Переглянути джерело

ctorrent-svn: fix musl compatibility

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 <jow@openwrt.org>
Jo-Philipp Wich 9 роки тому
джерело
коміт
0169cbd3a0

+ 2
- 2
net/ctorrent-svn/Makefile Переглянути файл

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2008 OpenWrt.org
2
+# Copyright (C) 2006-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
10 10
 PKG_NAME:=ctorrent-svn
11 11
 PKG_REV:=322
12 12
 PKG_VERSION:=r$(PKG_REV)
13
-PKG_RELEASE:=1
13
+PKG_RELEASE:=2
14 14
 
15 15
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 16
 PKG_SOURCE_URL:=https://svn.code.sf.net/p/dtorrent/code/dtorrent/trunk

+ 10
- 0
net/ctorrent-svn/patches/400-musl-compat.patch Переглянути файл

@@ -0,0 +1,10 @@
1
+--- a/compat.c
2
++++ b/compat.c
3
+@@ -51,6 +51,7 @@ int snprintf(char *str, size_t size, con
4
+ 
5
+ #ifndef HAVE_STRNSTR
6
+ #include <string.h>
7
++#include <sys/types.h>
8
+ /* FUNCTION PROGRAMER: Siberiaic Sang */
9
+ char *strnstr(const char *haystack, const char *needle, size_t haystacklen)
10
+ {