* lib/mountlist.c (MOUNTED): Redefine on Android.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
Android.
+2019-01-26 Bruno Haible <bruno@clisp.org>
+
+ mountlist: Port better to Android.
+ * lib/mountlist.c (MOUNTED): Redefine on Android.
+ * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
+ Android.
+
2019-01-26 Bruno Haible <bruno@clisp.org>
striconveh: Fix use of uninitialized iconv_t.
also (obsolete) 4.3BSD, SunOS */
# include <mntent.h>
# include <sys/types.h>
-# if !defined MOUNTED
+# if defined __ANDROID__ /* Android */
+ /* Bionic versions from between 2014-01-09 and 2015-01-08 define MOUNTED to
+ an incorrect value; older Bionic versions don't define it at all. */
+# undef MOUNTED
+# define MOUNTED "/proc/mounts"
+# elif !defined MOUNTED
# if defined _PATH_MOUNTED /* GNU libc */
# define MOUNTED _PATH_MOUNTED
# endif
-# serial 36
+# serial 37
# How to list mounted file systems.
# Copyright (C) 1998-2004, 2006, 2009-2019 Free Software Foundation, Inc.
#include <stdio.h>
#include <mntent.h>
-#if !defined MOUNTED
-# if defined _PATH_MOUNTED /* GNU libc */
+#if defined __ANDROID__ /* Android */
+# undef MOUNTED
+# define MOUNTED "/proc/mounts"
+#elif !defined MOUNTED
+# if defined _PATH_MOUNTED /* GNU libc */
# define MOUNTED _PATH_MOUNTED
# endif
-# if defined MNT_MNTTAB /* HP-UX. */
+# if defined MNT_MNTTAB /* HP-UX. */
# define MOUNTED MNT_MNTTAB
# endif
#endif