Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-156

CONC 2.2.2 build fails on FreeBSD due to not including necessary header.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.2.3, 3.0.1
    • None
    • None
    • FreeBSD 10.2-RELEASE, CMake 3.4.2, FreeBSD Clang 3.4.1

    Description

      On FreeBSD, building CONC 2.2.2 fails with following error message:

      Clang Error Message

      /root/mariadb/libmariadb/violite.c:565:44: error: use of undeclared identifier 'TCP_NODELAY'
            if (setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void *) &nodelay,
                                                 ^

      On libmariadb/violite.c:53, there is this preprocessor condition that keeps FreeBSD from including TCP related constants:

      #if !defined(MSDOS) && !defined(_WIN32) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__FreeBSD__)

      `TCP_NODELAY` is defined in <netinet/tcp.h> on FreeBSD, so to build without the error above, the `!defined(_FreeBSD_)` needs to be deleted. AFAIK this removal will not cause serious side effects, since all three header files affected by the condition are existing on FreeBSD.

      Attachments

        Activity

          People

            georg Georg Richter
            ardiefox Ardie H. Hwang
            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.