Attempt to fix bug 5778
authorVolker Lendecke <vl@samba.org>
Sun, 21 Sep 2008 18:39:17 +0000 (20:39 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 21 Sep 2008 20:56:50 +0000 (22:56 +0200)
Jeff, Steve, please check!

source3/client/mount.cifs.c

index 3b56e5f861a6a2cbb05721ed17b982f0b9e80b75..b7a76c61024abfd37651659e0ab34ec924b8d886 100644 (file)
  #endif /* _SAMBA_BUILD_ */
 #endif /* MOUNT_CIFS_VENDOR_SUFFIX */
 
+#ifdef _SAMBA_BUILD_
+#include "include/config.h"
+#endif
+
 #ifndef MS_MOVE 
 #define MS_MOVE 8192 
 #endif 
@@ -94,6 +98,8 @@ char * prefixpath = NULL;
 
 /* like strncpy but does not 0 fill the buffer and always null
  *    terminates. bufsize is the size of the destination buffer */
+
+#ifndef HAVE_STRLCPY
 static size_t strlcpy(char *d, const char *s, size_t bufsize)
 {
        size_t len = strlen(s);
@@ -104,10 +110,13 @@ static size_t strlcpy(char *d, const char *s, size_t bufsize)
        d[len] = 0;
        return ret;
 }
+#endif
 
 /* like strncat but does not 0 fill the buffer and always null
  *    terminates. bufsize is the length of the buffer, which should
  *       be one more than the maximum resulting string length */
+
+#ifndef HAVE_STRLCAT
 static size_t strlcat(char *d, const char *s, size_t bufsize)
 {
        size_t len1 = strlen(d);
@@ -126,6 +135,7 @@ static size_t strlcat(char *d, const char *s, size_t bufsize)
        }
        return ret;
 }
+#endif
 
 /* BB finish BB