Commit b5ba8d60 authored by Brendan Heading's avatar Brendan Heading Committed by Thomas Petazzoni
Browse files

package/ctorrent: fix compilation under musl.

Fixes http://autobuild.buildroot.net/results/2c9/2c9ef771d146ce5b9df82735fdeb62926c84bd9f/



Build failed due to use of ssize_t without including <unistd.h>.

Patch submitted upstream (note: project appears dormant).

Signed-off-by: default avatarBrendan Heading <brendanheading@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 71107b6c
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
[PATCH] Fix compilation on musl

Using the ssize_t typedef requires including <unistd.h>. 

See : https://sourceforge.net/p/dtorrent/patches/3/

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
Upstream-status: submitted
---
diff -Nur a/compat.c b/compat.c
--- a/compat.c	2015-07-29 18:22:24.658415171 +0100
+++ b/compat.c	2015-07-29 18:36:21.752576311 +0100
@@ -63,6 +63,7 @@
 
 #ifndef HAVE_STRNSTR
 #include <string.h>
+#include <unistd.h>
 /* FUNCTION PROGRAMER: Siberiaic Sang */
 char *strnstr(const char *haystack, const char *needle, size_t haystacklen)
 {