summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/includes.h7
-rw-r--r--source3/lib/system.c4
-rw-r--r--source3/smbd/reply.c2
3 files changed, 10 insertions, 3 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 788e4485ab..69b629f07c 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -376,13 +376,18 @@
/*
* Type for statvfs structure.
+ * Unfortunately, due to the make proto structure
+ * we still need to define this as void * for platforms
+ * that don't have either statvfs or statvfs64. JRA.
*/
#ifndef SMB_STRUCT_STATVFS
# if defined(STAT_STATVFS64)
# define SMB_STRUCT_STATVFS struct statvfs64
-# else
+# elif defined(STAT_STATVFS)
# define SMB_STRUCT_STATVFS struct statvfs
+# else
+# define SMB_STRUCT_STATVFS void *
# endif
#endif
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 18e84d66f0..52be504c52 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -186,8 +186,10 @@ int sys_statvfs( const char *path, SMB_STRUCT_STATVFS *fsd)
{
#if defined(STAT_STATVFS64)
return statvfs64(path, fsd);
-#else
+#elif defined(STAT_STATVFS)
return statvfs(path, fsd);
+#else
+ return -1;
#endif
}
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 93beb12af3..c4aadb9dad 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -932,7 +932,7 @@ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz
SSVAL(outbuf,smb_vwv2,512);
SSVAL(outbuf,smb_vwv3,dfree);
- DEBUG(3,("dskattr dfree=%d\n", dfree));
+ DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree));
return(outsize);
}