diff -ur samba-3.6.5/source3/include/libsmb_internal.h samba-3.6.5-mint/source3/include/libsmb_internal.h --- samba-3.6.5/source3/include/libsmb_internal.h 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/include/libsmb_internal.h 2012-05-17 23:23:03.000000000 +0000 @@ -199,8 +199,10 @@ smbc_stat_fn stat_fn; smbc_fstat_fn fstat_fn; #endif +#ifdef HAVE_SYS_STATVFS_H smbc_statvfs_fn statvfs_fn; smbc_fstatvfs_fn fstatvfs_fn; +#endif /* HAVE_SYS_STATVFS_H */ smbc_ftruncate_fn ftruncate_fn; #if 0 /* Left in libsmbclient.h for backward compatibility */ smbc_close_fn close_fn; @@ -505,6 +507,7 @@ struct stat *st); +#ifdef HAVE_SYS_STATVFS_H int SMBC_statvfs_ctx(SMBCCTX *context, char *path, @@ -515,6 +518,7 @@ SMBC_fstatvfs_ctx(SMBCCTX *context, SMBCFILE *file, struct statvfs *st); +#endif /* HAVE_SYS_STATVFS_H */ /* Functions in libsmb_xattr.c */ diff -ur samba-3.6.5/source3/include/libsmbclient.h samba-3.6.5-mint/source3/include/libsmbclient.h --- samba-3.6.5/source3/include/libsmbclient.h 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/include/libsmbclient.h 2012-05-17 23:23:03.000000000 +0000 @@ -75,7 +75,9 @@ /* Make sure we have the following includes for now ... */ #include #include +#ifdef HAVE_SYS_STATVFS_H #include +#endif /* HAVE_SYS_STATVFS_H */ #include #include @@ -175,6 +177,7 @@ } smbc_smb_encrypt_level; +#ifdef HAVE_SYS_STATVFS_H /** * Capabilities set in the f_flag field of struct statvfs, from * smbc_statvfs(). These may be OR-ed together to reflect a full set of @@ -190,6 +193,7 @@ SMBC_VFS_FEATURE_CASE_INSENSITIVE = (1 << 29), SMBC_VFS_FEATURE_NO_UNIXCIFS = (1 << 30) } smbc_vfs_feature; +#endif /* HAVE_SYS_STATVFS_H */ typedef int smbc_bool; @@ -881,6 +885,7 @@ smbc_fstat_fn smbc_getFunctionFstat(SMBCCTX *c); void smbc_setFunctionFstat(SMBCCTX *c, smbc_fstat_fn fn); +#ifdef HAVE_SYS_STATVFS_H typedef int (*smbc_statvfs_fn)(SMBCCTX *c, char *path, struct statvfs *st); @@ -892,6 +897,7 @@ struct statvfs *st); smbc_fstatvfs_fn smbc_getFunctionFstatVFS(SMBCCTX *c); void smbc_setFunctionFstatVFS(SMBCCTX *c, smbc_fstatvfs_fn fn); +#endif /* HAVE_SYS_STATVFS_H */ typedef int (*smbc_ftruncate_fn)(SMBCCTX *c, SMBCFILE *f, @@ -1634,6 +1640,7 @@ int smbc_fstat(int fd, struct stat *st); +#ifdef HAVE_SYS_STATVFS_H /**@ingroup attribute * Get file system information for a specified path. * @@ -1680,7 +1687,7 @@ int smbc_fstatvfs(int fd, struct statvfs *st); - +#endif /* HAVE_SYS_STATVFS_H */ /**@ingroup attribute * Truncate a file given a file descriptor diff -ur samba-3.6.5/source3/libads/dns.c samba-3.6.5-mint/source3/libads/dns.c --- samba-3.6.5/source3/libads/dns.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/libads/dns.c 2012-05-18 14:54:23.000000000 +0000 @@ -54,7 +54,9 @@ #endif #endif +#if !defined(T_SRV) # define T_SRV ns_t_srv +#endif #if !defined(T_NS) /* AIX 5.3 already defines T_NS */ # define T_NS ns_t_ns #endif diff -ur samba-3.6.5/source3/libsmb/libsmb_compat.c samba-3.6.5-mint/source3/libsmb/libsmb_compat.c --- samba-3.6.5/source3/libsmb/libsmb_compat.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/libsmb/libsmb_compat.c 2012-05-17 23:23:03.000000000 +0000 @@ -328,6 +328,7 @@ return smbc_getFunctionFstat(statcont)(statcont, file, st); } +#ifdef HAVE_SYS_STATVFS_H int smbc_statvfs(char *path, struct statvfs *st) @@ -342,6 +343,7 @@ SMBCFILE * file = find_fd(fd); return smbc_getFunctionFstatVFS(statcont)(statcont, file, st); } +#endif /* HAVE_SYS_STATVFS_H */ int smbc_ftruncate(int fd, Only in samba-3.6.5-mint/source3/libsmb: libsmb_compat.o diff -ur samba-3.6.5/source3/libsmb/libsmb_context.c samba-3.6.5-mint/source3/libsmb/libsmb_context.c --- samba-3.6.5/source3/libsmb/libsmb_context.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/libsmb/libsmb_context.c 2012-05-17 23:23:03.000000000 +0000 @@ -199,8 +199,10 @@ smbc_setFunctionLseek(context, SMBC_lseek_ctx); smbc_setFunctionFtruncate(context, SMBC_ftruncate_ctx); smbc_setFunctionStat(context, SMBC_stat_ctx); +#ifdef HAVE_SYS_STATVFS_H smbc_setFunctionStatVFS(context, SMBC_statvfs_ctx); smbc_setFunctionFstatVFS(context, SMBC_fstatvfs_ctx); +#endif /* HAVE_SYS_STATVFS_H */ smbc_setFunctionFstat(context, SMBC_fstat_ctx); smbc_setFunctionOpendir(context, SMBC_opendir_ctx); smbc_setFunctionClosedir(context, SMBC_closedir_ctx); diff -ur samba-3.6.5/source3/libsmb/libsmb_setget.c samba-3.6.5-mint/source3/libsmb/libsmb_setget.c --- samba-3.6.5/source3/libsmb/libsmb_setget.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/libsmb/libsmb_setget.c 2012-05-17 23:34:31.000000000 +0000 @@ -705,6 +705,7 @@ c->fstat = fn; } +#ifdef HAVE_SYS_STATVFS_H smbc_statvfs_fn smbc_getFunctionStatVFS(SMBCCTX *c) { @@ -728,6 +729,7 @@ { c->internal->posix_emu.fstatvfs_fn = fn; } +#endif /* HAVE_SYS_STATVFS_H */ smbc_ftruncate_fn smbc_getFunctionFtruncate(SMBCCTX *c) diff -ur samba-3.6.5/source3/libsmb/libsmb_stat.c samba-3.6.5-mint/source3/libsmb/libsmb_stat.c --- samba-3.6.5/source3/libsmb/libsmb_stat.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/libsmb/libsmb_stat.c 2012-05-17 23:23:03.000000000 +0000 @@ -294,6 +294,7 @@ } +#ifdef HAVE_SYS_STATVFS_H /* * Routine to obtain file system information given a path */ @@ -475,3 +476,4 @@ return 0; } +#endif /* HAVE_SYS_STATVFS_H */ diff -ur samba-3.6.5/source3/smbd/signing.c samba-3.6.5-mint/source3/smbd/signing.c --- samba-3.6.5/source3/smbd/signing.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/source3/smbd/signing.c 2012-05-20 21:32:39.000000000 +0000 @@ -101,7 +101,9 @@ static int smbd_shm_signing_destructor(struct smbd_shm_signing *s) { +#if HAVE_MMAP anonymous_shared_free(s->shm_pointer); +#endif return 0; } @@ -181,8 +183,10 @@ return false; } s->shm_size = 4096; +#if HAVE_MMAP s->shm_pointer = (uint8_t *)anonymous_shared_allocate(s->shm_size); +#endif if (s->shm_pointer == NULL) { talloc_free(s); return false; diff -ur samba-3.6.5/lib/crypto/hmacsha256.c samba-3.6.5-mint/lib/crypto/hmacsha256.c --- samba-3.6.5/lib/crypto/hmacsha256.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/lib/crypto/hmacsha256.c 2012-05-21 07:32:28.000000000 +0000 @@ -42,9 +42,9 @@ { SHA256_CTX tctx; - SHA256_Init(&tctx); - SHA256_Update(&tctx, key, key_len); - SHA256_Final(tk, &tctx); + pSHA256_Init(&tctx); + pSHA256_Update(&tctx, key, key_len); + pSHA256_Final(tk, &tctx); key = tk; key_len = SHA256_DIGEST_LENGTH; @@ -63,8 +63,8 @@ ctx->k_opad[i] ^= 0x5c; } - SHA256_Init(&ctx->ctx); - SHA256_Update(&ctx->ctx, ctx->k_ipad, 64); + pSHA256_Init(&ctx->ctx); + pSHA256_Update(&ctx->ctx, ctx->k_ipad, 64); } /*********************************************************************** @@ -72,7 +72,7 @@ ***********************************************************************/ _PUBLIC_ void hmac_sha256_update(const uint8_t *data, size_t data_len, struct HMACSHA256Context *ctx) { - SHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ + pSHA256_Update(&ctx->ctx, data, data_len); /* then text of datagram */ } /*********************************************************************** @@ -82,10 +82,10 @@ { SHA256_CTX ctx_o; - SHA256_Final(digest, &ctx->ctx); + pSHA256_Final(digest, &ctx->ctx); - SHA256_Init(&ctx_o); - SHA256_Update(&ctx_o, ctx->k_opad, 64); - SHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); - SHA256_Final(digest, &ctx_o); + pSHA256_Init(&ctx_o); + pSHA256_Update(&ctx_o, ctx->k_opad, 64); + pSHA256_Update(&ctx_o, digest, SHA256_DIGEST_LENGTH); + pSHA256_Final(digest, &ctx_o); } diff -ur samba-3.6.5/lib/crypto/sha256.c samba-3.6.5-mint/lib/crypto/sha256.c --- samba-3.6.5/lib/crypto/sha256.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/lib/crypto/sha256.c 2012-05-21 07:47:25.000000000 +0000 @@ -80,7 +80,7 @@ }; void -SHA256_Init (SHA256_CTX *m) +pSHA256_Init (SHA256_CTX *m) { m->sz[0] = 0; m->sz[1] = 0; @@ -187,7 +187,7 @@ }; void -SHA256_Update (SHA256_CTX *m, const void *v, size_t len) +pSHA256_Update (SHA256_CTX *m, const void *v, size_t len) { const unsigned char *p = (const unsigned char *)v; size_t old_sz = m->sz[0]; @@ -222,7 +222,7 @@ } void -SHA256_Final (void *res, SHA256_CTX *m) +pSHA256_Final (void *res, SHA256_CTX *m) { unsigned char zeros[72]; unsigned offset = (m->sz[0] / 8) % 64; @@ -238,7 +238,7 @@ zeros[dstart+2] = (m->sz[1] >> 8) & 0xff; zeros[dstart+1] = (m->sz[1] >> 16) & 0xff; zeros[dstart+0] = (m->sz[1] >> 24) & 0xff; - SHA256_Update (m, zeros, dstart + 8); + pSHA256_Update (m, zeros, dstart + 8); { int i; unsigned char *r = (unsigned char*)res; diff -ur samba-3.6.5/lib/util/util.c samba-3.6.5-mint/lib/util/util.c --- samba-3.6.5/lib/util/util.c 2012-04-27 18:25:33.000000000 +0000 +++ samba-3.6.5-mint/lib/util/util.c 2012-05-18 08:48:28.000000000 +0000 @@ -982,6 +982,7 @@ return true; } +#if HAVE_MMAP struct anonymous_shared_header { union { size_t length; @@ -1049,6 +1050,7 @@ munmap(hdr, hdr->u.length); } +#endif #ifdef DEVELOPER /* used when you want a debugger started at a particular point in the --- samba-3.6.5/source3/configure.in.old 2013-11-29 13:43:05.000000000 +0000 +++ samba-3.6.5-mint/source3/configure.in 2013-11-29 13:43:41.000000000 +0000 @@ -1838,7 +1838,7 @@ DSO_EXPORTS=\$\(DSO_EXPORTS_CMD\) fi -if test x"$BLDSHARED" = x"true" ; then +if test x"$BLDSHARED" = x"false" ; then LDFLAGS="$LDFLAGS -L./bin" fi --- samba-3.6.5/source3/configure.old 2013-11-29 13:43:50.000000000 +0000 +++ samba-3.6.5-mint/source3/configure 2013-11-29 13:44:27.000000000 +0000 @@ -19541,7 +19541,7 @@ DSO_EXPORTS=\$\(DSO_EXPORTS_CMD\) fi -if test x"$BLDSHARED" = x"true" ; then +if test x"$BLDSHARED" = x"false" ; then LDFLAGS="$LDFLAGS -L./bin" fi