Bug 5778 - strlcpy & strlcat are in uClibc
Summary: strlcpy & strlcat are in uClibc
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-19 17:32 UTC by Kevin Day
Modified: 2008-09-21 15:59 UTC (History)
0 users

See Also:


Attachments
proposed patch (1.50 KB, patch)
2008-09-21 13:38 UTC, Volker Lendecke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Day 2008-09-19 17:32:26 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.
Comment 1 Volker Lendecke 2008-09-21 13:38:15 UTC
Created attachment 3606 [details]
proposed patch

Does the attached patch help?
Comment 2 Kevin Day 2008-09-21 14:36:33 UTC
(In reply to comment #1)
> Created an attachment (id=3606) [edit]
> proposed patch
> 
> Does the attached patch help?
> 

It went through without a hitch.
The patch works.
Comment 3 Volker Lendecke 2008-09-21 15:59:22 UTC
Ok, thanks for testing. Checked in.

Volker