summaryrefslogtreecommitdiffstats
path: root/dosfstools/src
diff options
context:
space:
mode:
Diffstat (limited to 'dosfstools/src')
-rw-r--r--dosfstools/src/mkfs.fat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dosfstools/src/mkfs.fat.c b/dosfstools/src/mkfs.fat.c
index f6c6519d0..2dad23630 100644
--- a/dosfstools/src/mkfs.fat.c
+++ b/dosfstools/src/mkfs.fat.c
@@ -498,6 +498,8 @@ static uint64_t count_blocks(char *filename, int *remainder)
static void check_mount(char *device_name)
{
+/* older versions of Bionic don't have setmntent (4.x) or an incomplete impl (5.x) */
+#ifdef MOUNTED
FILE *f;
struct mntent *mnt;
@@ -507,6 +509,7 @@ static void check_mount(char *device_name)
if (strcmp(device_name, mnt->mnt_fsname) == 0)
die("%s contains a mounted filesystem.");
endmntent(f);
+#endif
}
/* Establish the geometry and media parameters for the device */