diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-08 09:25:28 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-08 09:25:28 +1000 |
commit | 5b2e2ba9e40d77d5876a96b248f9c526f8611b7c (patch) | |
tree | d1ad158c99f8bec56956508971a8c4b69ee19a5f /sftp-client.c | |
parent | ce38d8234d6969e4c222a0110e80357c2a61162c (diff) |
- (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@
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sftp-client.c b/sftp-client.c index 1e54348b7..8593cb8ce 100644 --- a/sftp-client.c +++ b/sftp-client.c | |||
@@ -24,7 +24,9 @@ | |||
24 | 24 | ||
25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
26 | #include <sys/param.h> | 26 | #include <sys/param.h> |
27 | #ifdef HAVE_SYS_STATVFS_H | ||
27 | #include <sys/statvfs.h> | 28 | #include <sys/statvfs.h> |
29 | #endif | ||
28 | #include "openbsd-compat/sys-queue.h" | 30 | #include "openbsd-compat/sys-queue.h" |
29 | #ifdef HAVE_SYS_STAT_H | 31 | #ifdef HAVE_SYS_STAT_H |
30 | # include <sys/stat.h> | 32 | # include <sys/stat.h> |
@@ -241,6 +243,7 @@ get_decode_stat(int fd, u_int expected_id, int quiet) | |||
241 | return(a); | 243 | return(a); |
242 | } | 244 | } |
243 | 245 | ||
246 | #ifdef USE_STATVFS | ||
244 | static int | 247 | static int |
245 | get_decode_statvfs(int fd, struct statvfs *st, u_int expected_id, int quiet) | 248 | get_decode_statvfs(int fd, struct statvfs *st, u_int expected_id, int quiet) |
246 | { | 249 | { |
@@ -290,6 +293,7 @@ get_decode_statvfs(int fd, struct statvfs *st, u_int expected_id, int quiet) | |||
290 | 293 | ||
291 | return 0; | 294 | return 0; |
292 | } | 295 | } |
296 | #endif | ||
293 | 297 | ||
294 | struct sftp_conn * | 298 | struct sftp_conn * |
295 | do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests) | 299 | do_init(int fd_in, int fd_out, u_int transfer_buflen, u_int num_requests) |
@@ -809,6 +813,7 @@ do_readlink(struct sftp_conn *conn, char *path) | |||
809 | } | 813 | } |
810 | #endif | 814 | #endif |
811 | 815 | ||
816 | #ifdef USE_STATVFS | ||
812 | int | 817 | int |
813 | do_statvfs(struct sftp_conn *conn, const char *path, struct statvfs *st, | 818 | do_statvfs(struct sftp_conn *conn, const char *path, struct statvfs *st, |
814 | int quiet) | 819 | int quiet) |
@@ -834,6 +839,7 @@ do_statvfs(struct sftp_conn *conn, const char *path, struct statvfs *st, | |||
834 | 839 | ||
835 | return get_decode_statvfs(conn->fd_in, st, id, quiet); | 840 | return get_decode_statvfs(conn->fd_in, st, id, quiet); |
836 | } | 841 | } |
842 | #endif | ||
837 | 843 | ||
838 | #ifdef notyet | 844 | #ifdef notyet |
839 | int | 845 | int |