summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c4
-rw-r--r--source3/lib/system.c13
-rw-r--r--source3/lib/util.c6
3 files changed, 18 insertions, 5 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 5f6ad5273a..0418098fb2 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -204,7 +204,7 @@ void reopen_logs( void )
if( !strcsequal( fname, debugf ) || !dbf || !file_exist( debugf, NULL ) )
{
- int oldumask = umask( 022 );
+ mode_t oldumask = umask( 022 );
pstrcpy( debugf, fname );
if( dbf )
@@ -314,7 +314,7 @@ va_dcl
{
if( !dbf )
{
- int oldumask = umask( 022 );
+ mode_t oldumask = umask( 022 );
if( append_log )
dbf = fopen( debugf, "a" );
diff --git a/source3/lib/system.c b/source3/lib/system.c
index c3d97e0350..18e84d66f0 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -179,6 +179,19 @@ int sys_lstat(char *fname,SMB_STRUCT_STAT *sbuf)
}
/*******************************************************************
+ An statvfs() wrapper that will deal with 64 bit filesizes.
+********************************************************************/
+
+int sys_statvfs( const char *path, SMB_STRUCT_STATVFS *fsd)
+{
+#if defined(STAT_STATVFS64)
+ return statvfs64(path, fsd);
+#else
+ return statvfs(path, fsd);
+#endif
+}
+
+/*******************************************************************
An ftruncate() wrapper that will deal with 64 bit filesizes.
********************************************************************/
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 002b31d027..886b6e4ac9 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1089,9 +1089,9 @@ trim the specified elements off the front and back of a string
BOOL trim_string(char *s,char *front,char *back)
{
BOOL ret = False;
- int front_len = (front && *front) ? strlen(front) : 0;
- int back_len = (back && *back) ? strlen(back) : 0;
- int s_len;
+ size_t front_len = (front && *front) ? strlen(front) : 0;
+ size_t back_len = (back && *back) ? strlen(back) : 0;
+ size_t s_len;
while (front_len && strncmp(s, front, front_len) == 0)
{