THRIFT-606. cpp: Fix build on Solaris Nevada
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@827890 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index bf38598..7d7b065 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -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
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 32f021a..1076455 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -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;
diff --git a/lib/cpp/src/transport/TServerSocket.cpp b/lib/cpp/src/transport/TServerSocket.cpp
index 3a4387e..6b5bf05 100644
--- a/lib/cpp/src/transport/TServerSocket.cpp
+++ b/lib/cpp/src/transport/TServerSocket.cpp
@@ -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;