mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:55:43 +01:00
alsactl: add define to compile with glibc 2.38
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 Fixes: https://github.com/alsa-project/alsa-utils/pull/225 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
5cdb598f59
commit
d6a71bfbde
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD))
|
#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)
|
static size_t strlcpy(char *dst, const char *src, size_t size)
|
||||||
{
|
{
|
||||||
size_t bytes = 0;
|
size_t bytes = 0;
|
||||||
|
@ -60,4 +61,5 @@ static size_t strlcat(char *dst, const char *src, size_t size)
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
#endif /* !(__GLIBC_PREREQ(2, 38)) */
|
||||||
#endif /* __GLIBC__ */
|
#endif /* __GLIBC__ */
|
||||||
|
|
Loading…
Reference in a new issue