Navigation Menu

Skip to content

Commit

Permalink
dosfstools: restore buildability with Android 4.4
Browse files Browse the repository at this point in the history
Bionic in Android 4.4 don't have setmntent

Change-Id: I8f9f03c084bd9c853b566fd94f6208566330cdc8
  • Loading branch information
that1 authored and Dees-Troy committed Dec 19, 2015
1 parent d18a821 commit 58a4133
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dosfstools/src/mkfs.fat.c
Expand Up @@ -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;

Expand All @@ -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 */
Expand Down

0 comments on commit 58a4133

Please sign in to comment.