From 8551b25e602660d4372787d9389bcddfe21db495 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 24 Mar 2025 11:06:25 +0100 Subject: [PATCH] mountlist: Fix a compilation error on Solaris with gcc 14. * lib/mountlist.c (read_file_system_list): Cast the argument of MNT_IGNORE. --- ChangeLog | 6 ++++++ lib/mountlist.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) 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); -- 2.39.5