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

handler_socket fails to compile on clang-20

Details

    Description

      [62/1509] Building CXX object plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/socket.cpp.o
      FAILED: plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/socket.cpp.o 
      /usr/bin/clang++ -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I/source/wsrep-lib/include -I/source/wsrep-lib/wsrep-API/v26 -I/build/include -I/source/include/providers -I/source/plugin/handler_socket/libhsclient -I/source/include -I/source/sql -I/source/zlib -I/build/zlib -stdlib=libc++ -O2 -g -DNDEBUG -fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE -DDBUG_OFF -fPIC -std=gnu++17 -MD -MT plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/socket.cpp.o -MF plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/socket.cpp.o.d -o plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/socket.cpp.o -c /source/plugin/handler_socket/libhsclient/socket.cpp
      /source/plugin/handler_socket/libhsclient/socket.cpp:176:12: error: no matching function for call to 'accept'
        176 |   fd.reset(accept(listen_fd, reinterpret_cast<sockaddr *>(&addr_r),
            |            ^~~~~~
      /usr/include/x86_64-linux-gnu/sys/socket.h:306:12: note: candidate function not viable: no known conversion from 'size_socket *' (aka 'int *') to 'socklen_t *__restrict' (aka 'unsigned int *__restrict') for 3rd argument
        306 | extern int accept (int __fd, __SOCKADDR_ARG __addr,
            |            ^
        307 |                    socklen_t *__restrict __addr_len);
            |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      [66/1509] Building CXX object plugin/handler_socket/CMakeFiles/hsclient.dir/libhsclient/hstcpcli.cpp.o
      ninja: build stopped: subcommand failed.
      

      Attachments

        Issue Links

          Activity

            danblack Daniel Black created issue -
            danblack Daniel Black made changes -
            Field Original Value New Value
            danblack Daniel Black made changes -
            Fix Version/s N/A [ 14700 ]
            Resolution Not a Bug [ 6 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.