Adjust strlcpy() and strlcat() per glibc adoption

These functions were added in glibc 2.38, in anticipation of POSIX
adopting them too.

Closes: #26
This commit is contained in:
Guillem Jover
2024-01-07 17:43:12 +01:00
parent ecb44e1655
commit df116b5597
3 changed files with 11 additions and 4 deletions

View File

@@ -41,7 +41,8 @@
#include <sys/types.h>
__BEGIN_DECLS
#ifndef __APPLE__
#if !defined(__APPLE__) && \
(!defined(__GLIBC__) || !__GLIBC_PREREQ(2, 38) || !defined(_DEFAULT_SOURCE))
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
#endif