Thrift
  1. Thrift
  2. THRIFT-1116

Compilation error in file TSSLSocket.cpp on FreeBSD-8.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: C++ - Library
    • Environment:

      OS: FreeBSD 8.0-RELEASE-p2, amd64
      Compiler: gcc (GCC) 4.2.1 20070719

    • Patch Info:
      Patch Available

      Description

      Thrift from SVN trunk as of r1085268 fails to compile on FreeBSD-8.0:

      libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/include -I./src -Wall -g -O2 -MT TSSLSocket.lo -MD -MP -MF .deps/TSSLSocket.Tpo -c src/transport/TSSLSocket.cpp -fPIC -DPIC -o .libs/TSSLSocket.o
      src/transport/TSSLSocket.cpp: In member function 'virtual void apache::thrift::transport::TSSLSocket::authorize()':
      src/transport/TSSLSocket.cpp:249: warning: type-punning to incomplete type might break strict-aliasing rules
      src/transport/TSSLSocket.cpp:249: error: 'getpeername' was not declared in this scope
      src/transport/TSSLSocket.cpp:250: error: 'AF_UNSPEC' was not declared in this scope
      src/transport/TSSLSocket.cpp: In member function 'virtual apache::thrift::transport::Decision apache::thrift::transport::DefaultClientAccessManager::verify(const sockaddr_storage&, const char*, int)':
      src/transport/TSSLSocket.cpp:594: error: 'AF_INET' was not declared in this scope
      src/transport/TSSLSocket.cpp:596: error: 'AF_INET6' was not declared in this scope
      gmake[4]: *** [TSSLSocket.lo] Error 1

      As per FreeBSD's getpeername(2) manual page, the following header files
      have to be included:

      #include <sys/types.h>
      #include <sys/socket.h>

      See the following URL for online reference of the getpeername(2) manual page:
      http://www.freebsd.org/cgi/man.cgi?query=getpeername&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html

      1. thrift_freebsd_socket.patch
        1 kB
        Pavlin Radoslavov
      2. thrift_freebsd_getpeername.patch
        0.4 kB
        Pavlin Radoslavov

        Activity

        Jake Farrell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Roger Meier made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Pavlin Radoslavov made changes -
        Attachment thrift_freebsd_socket.patch [ 12536776 ]
        Pavlin Radoslavov made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Jake Farrell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Roger Meier made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Pavlin Radoslavov [ pavlin ]
        Resolution Fixed [ 1 ]
        Pavlin Radoslavov made changes -
        Field Original Value New Value
        Attachment thrift_freebsd_getpeername.patch [ 12474595 ]
        Pavlin Radoslavov created issue -

          People

          • Assignee:
            Pavlin Radoslavov
            Reporter:
            Pavlin Radoslavov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development