Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3152

Compiler error on Mac OSX (missing #include <cstdlib>)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • None
    • None
    • Max OSX

    Description

      When compiling any recent (=git master) version of Thrift on Mac OSX in release mode, the compiler reports an error in TBufferTransports.hpp due to std::malloc/std::free not being found. The following patch fixes the compiler error (also attached as patch file):

      diff --git a/lib/cpp/src/thrift/transport/TBufferTransports.h b/lib/cpp/src/thrift/transport/TBufferTransports.h
      index eb08d62..17d617d 100644
      — a/lib/cpp/src/thrift/transport/TBufferTransports.h
      +++ b/lib/cpp/src/thrift/transport/TBufferTransports.h
      @@ -21,6 +21,7 @@
      #define THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H 1

      +#include <cstdlib>
      #include <cstring>
      #include <limits>
      #include <boost/scoped_array.hpp>

      Attachments

        1. include.patch
          0.4 kB
          Mathias Gottschlag

        Activity

          People

            Unassigned Unassigned
            mgottschlag Mathias Gottschlag
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: