From cadd56ca4dd15b17f98f9d606d7054827182205b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 28 Feb 2016 18:29:41 +0100 Subject: [PATCH] Fix build on DragonFlyBSD DragonFlyBSD has both vfsstat and fsstat apis. It lacks ST_NOWAIT however. The easiest fix is to swap the checks and use getfsstat first. --- src/utils_mount.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/utils_mount.c b/src/utils_mount.c index 05bc1a14..6555b418 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -431,16 +431,16 @@ static cu_mount_t *cu_mount_listmntent (void) #elif HAVE_GETVFSSTAT || HAVE_GETFSSTAT static cu_mount_t *cu_mount_getfsstat (void) { -#if HAVE_GETVFSSTAT -# define STRUCT_STATFS struct statvfs -# define CMD_STATFS getvfsstat -# define FLAGS_STATFS ST_NOWAIT -/* #endif HAVE_GETVFSSTAT */ -#elif HAVE_GETFSSTAT +#if HAVE_GETFSSTAT # define STRUCT_STATFS struct statfs # define CMD_STATFS getfsstat # define FLAGS_STATFS MNT_NOWAIT -#endif /* HAVE_GETFSSTAT */ +/* #endif HAVE_GETFSSTAT */ +#elif HAVE_GETVFSSTAT +# define STRUCT_STATFS struct statvfs +# define CMD_STATFS getvfsstat +# define FLAGS_STATFS ST_NOWAIT +#endif /* HAVE_GETVFSSTAT */ int bufsize; STRUCT_STATFS *buf; -- 2.30.2