Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33093

plugin/disks/information_schema_disks.cc doesn't compile on Solaris

    XMLWordPrintable

Details

    Description

      `information_schema_disks.cc` doesn't compile on Solaris for two issues:
      ```
      /vol/src/mariadb/mariadb-10.11.6/plugin/disks/information_schema_disks.cc:25:10: fatal error: sys/ucred.h: No such file or directory
      25 | #include <sys/ucred.h>

      ^~~~~~~~~~~~~
      ```
      This header doesn't exist on Solaris, which only has `<ucred.h>`. For now, I've just wrapped the `<sys/ucred.h>` inclusion in a (undefined) `HAVE_SYS_UCRED`, not trying to include `<ucred.h>` at all. The latter apparently wasn't needed, and I have no idea which target has/needs `<sys/ucred.h>`. If there is some such, this will need a corresponding `cmake` check.

      The other issue is
      ```
      /vol/src/mariadb/mariadb-10.11.6/plugin/disks/information_schema_disks.cc: In function ‘int Show::disks_fill_table(THD*, TABLE_LIST*, Item*)’:
      /vol/src/mariadb/mariadb-10.11.6/plugin/disks/information_schema_disks.cc:229:29: error: ‘MNTOPT_RO’ was not declared in this scope
      229 | if (hasmntopt(pEnt, MNTOPT_RO) != NULL)

      ^~~~~~~~~
      ```
      `MNTOPT_RO` is defined in `<sys/mntent.h>`. Again, I'm including that header in `HAVE_SYS_MNTENT` which of course needs corresponding `cmake` work.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            rorth Rainer Orth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.