* lib/mountlist.c: Solaris defines the OPT param of hasmntopt()
with char * instead of const char *. Passing the constant string
"ignore" generates a compiler warning. For Solaris cast MNT_IGNORE
to avoid the warning.
Signed-off-by: Ben Walton <bdwalton@gmail.com>
+2014-06-06 Ben Walton <bdwalton@gmail.com>
+
+ mountlist: avoid hasmntopt const type warning on solaris
+ * lib/mountlist.c: Solaris defines the OPT param of hasmntopt()
+ with char * instead of const char *. Passing the constant string
+ "ignore" generates a compiler warning. For Solaris cast MNT_IGNORE
+ to avoid the warning.
+
2014-06-04 Eric Blake <eblake@redhat.com>
maintainer-makefile: delete obsolete code
#undef MNT_IGNORE
#ifdef MNTOPT_IGNORE
-# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE)
+# if defined __sun && defined __SVR4
+/* Solaris defines hasmntopt(struct mnttab *, char *)
+ while it is otherwise hasmntopt(struct mnttab *, const char *). */
+# define MNT_IGNORE(M) hasmntopt (M, (char *) MNTOPT_IGNORE)
+# else
+# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE)
+# endif
#else
# define MNT_IGNORE(M) 0
#endif