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

replace deprecated mallinfo with mallinfo2

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.2.38
    • Server
    • None

    Description

      It seems GLibC 2.33 deprecates the mallinfo in favor of mallinfo2. I find reference to it here:

      https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601287.html

      At a glance the API is similar, I guess some size_t maybe used to be int?

      https://man7.org/linux/man-pages/man3/mallinfo2.3.html

      Here is the error I see when building:

      /home/eric/src/mariadb-server/sql/sql_test.cc: In function ‘void mysql_print_status()’:
      /home/eric/src/mariadb-server/sql/sql_test.cc:629:33: error: ‘mallinfo mallinfo()’ is deprecated [-Werror=deprecated-declarations]
        629 |   struct mallinfo info= mallinfo();
            |                         ~~~~~~~~^~
      In file included from /home/eric/src/mariadb-server/sql/sql_test.cc:33:
      /usr/include/malloc.h:114:24: note: declared here
        114 | extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;
            |                        ^~~~~~~~
      

      Attachments

        Activity

          People

            anel Anel Husakovic
            Eric_Herman Eric Herman
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.