From 58a413380c1eefa16a599600721eafaa4c6709a1 Mon Sep 17 00:00:00 2001 From: that Date: Mon, 7 Dec 2015 21:12:48 +0100 Subject: dosfstools: restore buildability with Android 4.4 Bionic in Android 4.4 don't have setmntent Change-Id: I8f9f03c084bd9c853b566fd94f6208566330cdc8 --- dosfstools/src/mkfs.fat.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dosfstools') 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 */ -- cgit v1.2.3