- (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c] Do not enable statvfs extensions on platforms that do not have statvfs. ok djm@
diff --git a/sftp.c b/sftp.c
index ffc35cb..c5c3b14 100644
--- a/sftp.c
+++ b/sftp.c
@@ -25,7 +25,9 @@
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/wait.h>
+#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
+#endif
#include <ctype.h>
#include <errno.h>
@@ -840,6 +842,7 @@
static int
do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
{
+#ifdef USE_STATVFS
struct statvfs st;
char s_used[FMT_SCALED_STRSIZE];
char s_avail[FMT_SCALED_STRSIZE];
@@ -885,6 +888,10 @@
st.f_blocks));
}
return 0;
+#else
+ error("client does not support statvfs extension");
+ return -1;
+#endif
}
/*