summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sftp.c b/sftp.c
index ffc35cb83..c5c3b1443 100644
--- a/sftp.c
+++ b/sftp.c
@@ -25,7 +25,9 @@
25#include <sys/param.h> 25#include <sys/param.h>
26#include <sys/socket.h> 26#include <sys/socket.h>
27#include <sys/wait.h> 27#include <sys/wait.h>
28#ifdef HAVE_SYS_STATVFS_H
28#include <sys/statvfs.h> 29#include <sys/statvfs.h>
30#endif
29 31
30#include <ctype.h> 32#include <ctype.h>
31#include <errno.h> 33#include <errno.h>
@@ -840,6 +842,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
840static int 842static int
841do_df(struct sftp_conn *conn, char *path, int hflag, int iflag) 843do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
842{ 844{
845#ifdef USE_STATVFS
843 struct statvfs st; 846 struct statvfs st;
844 char s_used[FMT_SCALED_STRSIZE]; 847 char s_used[FMT_SCALED_STRSIZE];
845 char s_avail[FMT_SCALED_STRSIZE]; 848 char s_avail[FMT_SCALED_STRSIZE];
@@ -885,6 +888,10 @@ do_df(struct sftp_conn *conn, char *path, int hflag, int iflag)
885 st.f_blocks)); 888 st.f_blocks));
886 } 889 }
887 return 0; 890 return 0;
891#else
892 error("client does not support statvfs extension");
893 return -1;
894#endif
888} 895}
889 896
890/* 897/*