update base pkgs..
[vuplus_openvuplus] / meta-openvuplus / recipes-base / samba / samba-3.0.37 / uclibc-strlcpy-strlcat.patch
1 diff --git source.old/client/mount.cifs.c source/client/mount.cifs.c
2 index 3b56e5f..b7a76c6 100644
3 --- source.old/client/mount.cifs.c
4 +++ source/client/mount.cifs.c
5 @@ -56,6 +56,10 @@
6   #endif /* _SAMBA_BUILD_ */
7  #endif /* MOUNT_CIFS_VENDOR_SUFFIX */
8  
9 +#ifdef _SAMBA_BUILD_
10 +#include "include/config.h"
11 +#endif
12 +
13  #ifndef MS_MOVE 
14  #define MS_MOVE 8192 
15  #endif 
16 @@ -94,6 +98,8 @@ char * prefixpath = NULL;
17  
18  /* like strncpy but does not 0 fill the buffer and always null
19   *    terminates. bufsize is the size of the destination buffer */
20 +
21 +#ifndef HAVE_STRLCPY
22  static size_t strlcpy(char *d, const char *s, size_t bufsize)
23  {
24         size_t len = strlen(s);
25 @@ -104,10 +110,13 @@ static size_t strlcpy(char *d, const char *s, size_t bufsize)
26         d[len] = 0;
27         return ret;
28  }
29 +#endif
30  
31  /* like strncat but does not 0 fill the buffer and always null
32   *    terminates. bufsize is the length of the buffer, which should
33   *       be one more than the maximum resulting string length */
34 +
35 +#ifndef HAVE_STRLCAT
36  static size_t strlcat(char *d, const char *s, size_t bufsize)
37  {
38         size_t len1 = strlen(d);
39 @@ -126,6 +135,7 @@ static size_t strlcat(char *d, const char *s, size_t bufsize)
40         }
41         return ret;
42  }
43 +#endif
44  
45  /* BB finish BB
46