]> Savannah Git Hosting - gnulib.git/commitdiff
mountlist: Fix a compilation error on Solaris with gcc 14.
authorBruno Haible <bruno@clisp.org>
Mon, 24 Mar 2025 10:06:25 +0000 (11:06 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 24 Mar 2025 10:06:25 +0000 (11:06 +0100)
* lib/mountlist.c (read_file_system_list): Cast the argument of
MNT_IGNORE.

ChangeLog
lib/mountlist.c

index a1edf795214af923aa6f8e0f5ccf05843d544d66..09544c91e0642a200382418629efb7f9208d8603 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-24  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        gocomp-script: Improve comments.
index fae9bb50cb9efab09cb885f3038c9267879eff1a..72bd3f3bb62ec2873a0b4f2159e098a3330eb293 100644 (file)
@@ -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);