strlcat and strlcpy have been added to glibc 2.38.
update the defines to use the glibc versions, and not conflict with
string.h.
ref:
- https://sourceware.org/git/?p=glibc.git;a=commit;h=
454a20c8756c9c1d55419153255fc7692b3d2199
cherry-picked from
d6a71bfbde9e1710743d3a446c6ea3b41c45234e
Fixes: https://github.com/alsa-project/alsa-utils/pull/225
Change-Id: Ibd83a79a017f7af2329496d49f9f0c44b24801f3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
*/
#if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD))
+#if !(__GLIBC_PREREQ(2, 38))
static size_t strlcpy(char *dst, const char *src, size_t size)
{
size_t bytes = 0;
*q = '\0';
return bytes;
}
+#endif /* !(__GLIBC_PREREQ(2, 38)) */
#endif /* __GLIBC__ */