diff options
author | Rémy Oudompheng <remyoudompheng@gmail.com> | 2011-04-05 01:37:09 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-06 15:56:21 -0500 |
commit | f8882839103442787c49b8021cfd8ae2784211ad (patch) | |
tree | c325dfa7f6806aeb6a78451da0fa62e9b602dd8c /lib/libalpm | |
parent | 272e9b355b17ab663ac4a0d9515d381dcf6f03ec (diff) | |
download | pacman-f8882839103442787c49b8021cfd8ae2784211ad.tar.xz |
diskspace: add the actually used statfs type in ifdefs
Some systems, like FreeBSD might define both statfs
and statvfs: however if statvfs exists whereas getmntinfo()
uses a statfs struct, the current ifdefs would select the wrong
line of code.
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/diskspace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 281173a2..066107d7 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -112,9 +112,9 @@ static alpm_list_t *mount_point_list(void) mp->mount_dir = strdup(fsp->f_mntonname); mp->mount_dir_len = strlen(mp->mount_dir); memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE)); -#if defined HAVE_STRUCT_STATVFS_F_FLAG +#if defined(HAVE_GETMNTINFO_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FLAG) mp->read_only = fsp->f_flag & ST_RDONLY; -#elif defined HAVE_STRUCT_STATFS_F_FLAGS +#elif defined(HAVE_GETMNTINFO_STATFS) && defined(HAVE_STRUCT_STATFS_F_FLAGS) mp->read_only = fsp->f_flags & MNT_RDONLY; #endif |