diff options
author | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
commit | f0de78bd4f29fa688c5df116f3f9cd43543a76d0 (patch) | |
tree | 856b0dee3f2764c13a32dad5ffe2424fab7fef41 /openbsd-compat/bsd-statvfs.c | |
parent | 4213eec74e74de6310c27a40c3e9759a08a73996 (diff) | |
parent | 8aa3455b16fddea4c0144a7c4a1edb10ec67dcc8 (diff) |
Import openssh_8.2p1.orig.tar.gz
Diffstat (limited to 'openbsd-compat/bsd-statvfs.c')
-rw-r--r-- | openbsd-compat/bsd-statvfs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-statvfs.c b/openbsd-compat/bsd-statvfs.c index e3bd87d98..10d876439 100644 --- a/openbsd-compat/bsd-statvfs.c +++ b/openbsd-compat/bsd-statvfs.c | |||
@@ -29,6 +29,11 @@ | |||
29 | # define MNAMELEN 32 | 29 | # define MNAMELEN 32 |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef HAVE_STRUCT_STATFS_F_FILES | ||
33 | # define HAVE_STRUCT_STATFS | ||
34 | #endif | ||
35 | |||
36 | #ifdef HAVE_STRUCT_STATFS | ||
32 | static void | 37 | static void |
33 | copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) | 38 | copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) |
34 | { | 39 | { |
@@ -48,11 +53,12 @@ copy_statfs_to_statvfs(struct statvfs *to, struct statfs *from) | |||
48 | #endif | 53 | #endif |
49 | to->f_namemax = MNAMELEN; | 54 | to->f_namemax = MNAMELEN; |
50 | } | 55 | } |
56 | #endif | ||
51 | 57 | ||
52 | # ifndef HAVE_STATVFS | 58 | # ifndef HAVE_STATVFS |
53 | int statvfs(const char *path, struct statvfs *buf) | 59 | int statvfs(const char *path, struct statvfs *buf) |
54 | { | 60 | { |
55 | # ifdef HAVE_STATFS | 61 | # if defined(HAVE_STATFS) && defined(HAVE_STRUCT_STATFS) |
56 | struct statfs fs; | 62 | struct statfs fs; |
57 | 63 | ||
58 | memset(&fs, 0, sizeof(fs)); | 64 | memset(&fs, 0, sizeof(fs)); |
@@ -70,7 +76,7 @@ int statvfs(const char *path, struct statvfs *buf) | |||
70 | # ifndef HAVE_FSTATVFS | 76 | # ifndef HAVE_FSTATVFS |
71 | int fstatvfs(int fd, struct statvfs *buf) | 77 | int fstatvfs(int fd, struct statvfs *buf) |
72 | { | 78 | { |
73 | # ifdef HAVE_FSTATFS | 79 | # if defined(HAVE_FSTATFS) && defined(HAVE_STRUCT_STATFS) |
74 | struct statfs fs; | 80 | struct statfs fs; |
75 | 81 | ||
76 | memset(&fs, 0, sizeof(fs)); | 82 | memset(&fs, 0, sizeof(fs)); |