]>
git.ipfire.org Git - thirdparty/tvheadend.git/commit
configure: check for strlcat & strlcpy
Building tvheadend with uclibc and musl fails:
src/tvh_string.h:50:22: error: static declaration of 'strlcpy' follows non-static declaration
static inline size_t strlcpy(char *dst, const char *src, size_t size)
src/tvh_string.h:61:22: error: static declaration of 'strlcat' follows non-static declaration
static inline size_t strlcat(char *dst, const char *src, size_t count)
because they provide strlcat & strlcpy:
https://sourceware.org/glibc/wiki/strlcpy
This patch adds configure checks and makes the implementation in
tvh_string.h optional, the configure log looks like this:
glibc
checking for cc strlcat ... fail
checking for cc strlcpy ... fail
musl
checking for cc strlcat ... ok
checking for cc strlcpy ... ok
uclibc
checking for cc strlcat ... ok
checking for cc strlcpy ... ok