Substitute strlcpy() for strncpy() which should do the same job on all standard C libraries.
strlcpy()
strncpy()
(The problem here was that strlcpy doesn't exist in glibc)