The Samba-Bugzilla – Attachment 6573 Details for
Bug 8225
build failures on systems without sys/statvfs.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
statvfs.diff (text/plain), 5.48 KB, created by
Herb Lewis
on 2011-06-13 18:33:05 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Herb Lewis
Created:
2011-06-13 18:33:05 UTC
Size:
5.48 KB
patch
obsolete
>diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h >index 61dc95e..5d9b09d 100644 >--- a/source3/include/libsmb_internal.h >+++ b/source3/include/libsmb_internal.h >@@ -199,8 +199,10 @@ struct SMBC_internal_data { > 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 @@ SMBC_fstat_ctx(SMBCCTX *context, > struct stat *st); > > >+#ifdef HAVE_SYS_STATVFS_H > int > SMBC_statvfs_ctx(SMBCCTX *context, > char *path, >@@ -515,6 +518,7 @@ int > SMBC_fstatvfs_ctx(SMBCCTX *context, > SMBCFILE *file, > struct statvfs *st); >+#endif /* HAVE_SYS_STATVFS_H */ > > > /* Functions in libsmb_xattr.c */ >diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h >index ccf80da..6413f70 100644 >--- a/source3/include/libsmbclient.h >+++ b/source3/include/libsmbclient.h >@@ -75,7 +75,9 @@ extern "C" { > /* Make sure we have the following includes for now ... */ > #include <sys/types.h> > #include <sys/stat.h> >+#ifdef HAVE_SYS_STATVFS_H > #include <sys/statvfs.h> >+#endif /* HAVE_SYS_STATVFS_H */ > #include <fcntl.h> > #include <utime.h> > >@@ -175,6 +177,7 @@ typedef enum smbc_smb_encrypt_level > } 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 @@ typedef enum smbc_vfs_feature > 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 @@ typedef int (*smbc_fstat_fn)(SMBCCTX *c, > 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 @@ typedef int (*smbc_fstatvfs_fn)(SMBCCTX *c, > 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_stat(const char *url, struct stat *st); > 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 @@ smbc_statvfs(char *url, > int > smbc_fstatvfs(int fd, > struct statvfs *st); >- >+#endif /* HAVE_SYS_STATVFS_H */ > > /**@ingroup attribute > * Truncate a file given a file descriptor >diff --git a/source3/libsmb/libsmb_compat.c b/source3/libsmb/libsmb_compat.c >index 5b2ef2d..3994bf2 100644 >--- a/source3/libsmb/libsmb_compat.c >+++ b/source3/libsmb/libsmb_compat.c >@@ -328,6 +328,7 @@ smbc_fstat(int fd, > return smbc_getFunctionFstat(statcont)(statcont, file, st); > } > >+#ifdef HAVE_SYS_STATVFS_H > int > smbc_statvfs(char *path, > struct statvfs *st) >@@ -342,6 +343,7 @@ smbc_fstatvfs(int fd, > SMBCFILE * file = find_fd(fd); > return smbc_getFunctionFstatVFS(statcont)(statcont, file, st); > } >+#endif /* HAVE_SYS_STATVFS_H */ > > int > smbc_ftruncate(int fd, >diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c >index 6c20d65..b3079c7 100644 >--- a/source3/libsmb/libsmb_context.c >+++ b/source3/libsmb/libsmb_context.c >@@ -199,8 +199,10 @@ smbc_new_context(void) > 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 --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c >index 0a02346..4cdf70b 100644 >--- a/source3/libsmb/libsmb_setget.c >+++ b/source3/libsmb/libsmb_setget.c >@@ -705,6 +705,7 @@ smbc_setFunctionFstat(SMBCCTX *c, smbc_fstat_fn fn) > c->fstat = fn; > } > >+#ifdef HAVE_SYS_STATVFS_H > smbc_statvfs_fn > smbc_getFunctionStatVFS(SMBCCTX *c) > { >@@ -722,6 +723,7 @@ smbc_getFunctionFstatVFS(SMBCCTX *c) > { > return c->internal->posix_emu.fstatvfs_fn; > } >+#endif /* HAVE_SYS_STATVFS_H */ > > void > smbc_setFunctionFstatVFS(SMBCCTX *c, smbc_fstatvfs_fn fn) >diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c >index 426ace9..ef8ec39 100644 >--- a/source3/libsmb/libsmb_stat.c >+++ b/source3/libsmb/libsmb_stat.c >@@ -294,6 +294,7 @@ SMBC_fstat_ctx(SMBCCTX *context, > } > > >+#ifdef HAVE_SYS_STATVFS_H > /* > * Routine to obtain file system information given a path > */ >@@ -475,3 +476,4 @@ SMBC_fstatvfs_ctx(SMBCCTX *context, > > return 0; > } >+#endif /* HAVE_SYS_STATVFS_H */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8225
: 6573