Compilation fails against the musl C library
Brought to you by:
dholmes999
Hi guys,
When compiling against musl the build fails :
compat.c: In function ‘strnstr’:
compat.c:70:3: error: unknown type name ‘ssize_t’
ssize_t plen;
^
compat.c:71:3: error: unknown type name ‘ssize_t’
ssize_t len = strlen(needle);
^
Makefile:291: recipe for target 'compat.o' failed
This is because <unistd.h> is not included, as required for the ssize_t type. glibc seems to allow this (probably because of nested includes) but it breaks under musl.
Patch to fix this problem attached.