From: Bruno Haible Date: Mon, 24 Mar 2025 10:06:25 +0000 (+0100) Subject: mountlist: Fix a compilation error on Solaris with gcc 14. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8551b25e602660d4372787d9389bcddfe21db495;p=gnulib.git mountlist: Fix a compilation error on Solaris with gcc 14. * lib/mountlist.c (read_file_system_list): Cast the argument of MNT_IGNORE. --- diff --git a/ChangeLog b/ChangeLog index a1edf79521..09544c91e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-03-24 Bruno Haible + + mountlist: Fix a compilation error on Solaris with gcc 14. + * lib/mountlist.c (read_file_system_list): Cast the argument of + MNT_IGNORE. + 2025-03-24 Bruno Haible gocomp-script: Improve comments. diff --git a/lib/mountlist.c b/lib/mountlist.c index fae9bb50cb..72bd3f3bb6 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -884,7 +884,9 @@ read_file_system_list (bool need_fs_type) me->me_mntroot = NULL; me->me_type = xstrdup (mnt.mnt_fstype); me->me_type_malloced = 1; - me->me_dummy = MNT_IGNORE (&mnt) != 0; + /* The cast from 'struct extmnttab *' to 'struct mnttab *' is OK + because 'struct extmnttab' extends 'struct mnttab'. */ + me->me_dummy = MNT_IGNORE ((struct mnttab *) &mnt) != 0; me->me_remote = ME_REMOTE (me->me_devname, me->me_type); me->me_dev = makedev (mnt.mnt_major, mnt.mnt_minor);