diff options
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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, | |||
840 | static int | 842 | static int |
841 | do_df(struct sftp_conn *conn, char *path, int hflag, int iflag) | 843 | do_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 | /* |