Sync with gnulib 502809019bd2ca3ce3d041d18c35ce9420eedb72.

Avoid hasmntopt const type warning on Solaris.

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: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2014-06-08 09:33:11 +04:00
parent a18cf7bae6
commit 46651f04d1

View File

@ -163,7 +163,13 @@
#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