Mathias Gottschlag created THRIFT-3152:
------------------------------------------

             Summary: Compiler error on Mac OSX (missing #include <cstdlib>)
                 Key: THRIFT-3152
                 URL: https://issues.apache.org/jira/browse/THRIFT-3152
             Project: Thrift
          Issue Type: Bug
         Environment: Max OSX
            Reporter: Mathias Gottschlag


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>
 




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to