THRIFT-606. cpp: Fix build on Solaris Nevada
authorDavid Reiss <dreiss@apache.org>
Wed, 21 Oct 2009 05:51:28 +0000 (05:51 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 21 Oct 2009 05:51:28 +0000 (05:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@827890 13f79535-47bb-0310-9956-ffa450edef68

configure.ac
lib/cpp/src/protocol/TProtocol.h
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/transport/TServerSocket.cpp

index 6ab49db..a3b0b4b 100644 (file)
@@ -142,6 +142,7 @@ dnl My best guess is that it is where glibc stashes its implementation
 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
index bf38598..7d7b065 100644 (file)
@@ -86,7 +86,10 @@ using apache::thrift::transport::TTransport;
 #  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
 
index 32f021a..1076455 100644 (file)
 #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;
index 3a4387e..6b5bf05 100644 (file)
 #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;