The Samba-Bugzilla – Bug 5778
strlcpy & strlcat are in uClibc
Last modified: 2008-09-21 15:59:22 UTC
Samba 3.2.4 introduces a bugfix where strlcat and strlcpy are not present in glibc.
source/client/mount.cifs.c, line 92 states as much.
However, under uClibc, they do exist and are defined.
The current implementation does not check to see if strlcpy and strlcat are already defined, resulting in the compiler errors:
client/mount.cifs.c:98: error: static declaration of 'strlcpy' follows non-static declaration
/usr/include/string.h:424: error: previous declaration of 'strlcpy' was here
client/mount.cifs.c:112: error: static declaration of 'strlcat' follows non-static declaration
/usr/include/string.h:422: error: previous declaration of 'strlcat' was here
These should be wrapped in an #ifdef or something similar to prevent them from being defined when the host libc actually defines them.
Created attachment 3606 [details]
Does the attached patch help?
(In reply to comment #1)
> Created an attachment (id=3606) 
> proposed patch
> Does the attached patch help?
It went through without a hitch.
The patch works.
Ok, thanks for testing. Checked in.