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

Compile error with gcc-15 (__sighandler_t in extra/readline)

Details

    Description

      The typedef should be:
      typedef RETSIGTYPE SigHandler (int);
      not
      typedef RETSIGTYPE SigHandler ();

      And the RETSIGTYPE should probably be void.

      [10/58] Building C object extra/readline/CMakeFiles/readline.dir/signals.c.o
      FAILED: extra/readline/CMakeFiles/readline.dir/signals.c.o
      /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -DHAVE_CONFIG_H -DNO_KILL_INTR -D_FILE_OFFSET_BITS=64 -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/wsrep-lib/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/wsrep-lib/wsrep-API/v26 -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/.x86_64-libreelec-linux-gnu/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/include/providers -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/include -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/extra/readline -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG  -DDBUG_OFF -std=gnu99 -MD -MT extra/readline/CMakeFiles/readline.dir/signals.c.o -MF extra/readline/CMakeFiles/readline.dir/signals.c.o.d -o extra/readline/CMakeFiles/readline.dir/signals.c.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/mariadb-11.4.4/extra/readline/signals.c
      ../extra/readline/signals.c: In function 'rl_set_sighandler':
      ../extra/readline/signals.c:254:18: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]
        254 |   act.sa_handler = handler;
            |                  ^
      ../extra/readline/signals.c:269:21: error: returning '__sighandler_t' {aka 'void (*)(int)'} from a function with incompatible return type 'int (*)()' [-Wincompatible-pointer-types]
        269 |   return (ohandler->sa_handler);
            |                     ^~~~~~~~~~
      

      Attachments

        Issue Links

          Activity

            same underlying reason as in MDEV-35607

            serg Sergei Golubchik added a comment - same underlying reason as in MDEV-35607
            heitbaum Rudi Heitbaum added a comment - - edited

            I believe that the fixes in MDEV-35607 will fix most of the issues - I will continue to test that one.
            But this one does require 1 separate fix:

            typedef RETSIGTYPE SigHandler (int);

            the handler is support to require an (int sig)

            'void (*)(int)' <- correct
            'void (*)()' <- this code

            heitbaum Rudi Heitbaum added a comment - - edited I believe that the fixes in MDEV-35607 will fix most of the issues - I will continue to test that one. But this one does require 1 separate fix: typedef RETSIGTYPE SigHandler (int); the handler is support to require an (int sig) 'void (*)(int)' <- correct 'void (*)()' <- this code

            Possible. But note the compiler complains about void (*)(int) vs int (*)(). I suspect — not sure — that the actual problem is void vs int return type, which will be fixed in MDEV-35607. If I'm wrong and the error won't go away after fixing the return type — that is, if the compiler will be complaining about void (*)(int) vs void (*)() — then we'll reopen this bug and fix it separately, as it won't be a duplicate.

            serg Sergei Golubchik added a comment - Possible. But note the compiler complains about void (*)(int) vs int (*)() . I suspect — not sure — that the actual problem is void vs int return type, which will be fixed in MDEV-35607 . If I'm wrong and the error won't go away after fixing the return type — that is, if the compiler will be complaining about void (*)(int) vs void (*)() — then we'll reopen this bug and fix it separately, as it won't be a duplicate.

            People

              serg Sergei Golubchik
              heitbaum Rudi Heitbaum
              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.