Author: dreiss
Date: Wed Oct 21 05:51:28 2009
New Revision: 827890

URL: http://svn.apache.org/viewvc?rev=827890&view=rev
Log:
THRIFT-606. cpp: Fix build on Solaris Nevada

Modified:
    incubator/thrift/trunk/configure.ac
    incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h
    incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
    incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp

Modified: incubator/thrift/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/configure.ac?rev=827890&r1=827889&r2=827890&view=diff
==============================================================================
--- incubator/thrift/trunk/configure.ac (original)
+++ incubator/thrift/trunk/configure.ac Wed Oct 21 05:51:28 2009
@@ -142,6 +142,7 @@
 dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
 dnl and we haven't yet found a system where this is a problem.
 AC_CHECK_LIB(rt, clock_gettime)
+AC_CHECK_LIB(socket, setsockopt)
 
 AC_TYPE_INT16_T
 AC_TYPE_INT32_T

Modified: incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h?rev=827890&r1=827889&r2=827890&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/protocol/TProtocol.h Wed Oct 21 05:51:28 
2009
@@ -86,7 +86,10 @@
 #  define __LITTLE_ENDIAN LITTLE_ENDIAN
 #  define __BIG_ENDIAN BIG_ENDIAN
 # else
-#  error "Cannot determine endianness"
+#  include <boost/config.hpp>
+#  define __BYTE_ORDER BOOST_BYTE_ORDER
+#  define __LITTLE_ENDIAN BOOST_LITTLE_ENDIAN
+#  define __BIG_ENDIAN BOOST_BIG_ENDIAN
 # endif
 #endif
 

Modified: incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp?rev=827890&r1=827889&r2=827890&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/server/TNonblockingServer.cpp Wed Oct 21 
05:51:28 2009
@@ -29,6 +29,10 @@
 #include <errno.h>
 #include <assert.h>
 
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
 namespace apache { namespace thrift { namespace server {
 
 using namespace apache::thrift::protocol;

Modified: incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp?rev=827890&r1=827889&r2=827890&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/transport/TServerSocket.cpp Wed Oct 21 
05:51:28 2009
@@ -33,6 +33,10 @@
 #include "TServerSocket.h"
 #include <boost/shared_ptr.hpp>
 
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
 namespace apache { namespace thrift { namespace transport {
 
 using namespace std;


Reply via email to