samba-add-check-for-__use_bsd.patch 669 B

123456789101112131415161718
  1. --- a/source/client/mount.cifs.c
  2. +++ b/source/client/mount.cifs.c
  3. @@ -96,6 +96,7 @@ char * prefixpath = NULL;
  4. /* glibc doesn't have strlcpy, strlcat. Ensure we do. JRA. We
  5. * don't link to libreplace so need them here. */
  6. +#if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD))
  7. /* like strncpy but does not 0 fill the buffer and always null
  8. * terminates. bufsize is the size of the destination buffer */
  9. @@ -177,6 +178,7 @@ static void mount_cifs_usage(void)
  10. SAFE_FREE(mountpassword);
  11. exit(EX_USAGE);
  12. }
  13. +#endif /* __GLIBC__ && !(__UCLIBC__ && __USE_BSD) */
  14. /* caller frees username if necessary */
  15. static char * getusername(void) {